1 viewer
rust 1,860,549 · typescript 235,540 · javascript 132,956 · python 20,426 · 6,408 files · digest f04d4637f52b · built in 1.5 s · crystals off
crates/cre8-app-image/src/providers/huggingface.rs
Items
const ENV_KEY const VAULT_CREDENTIAL const CRED_NAME const ALT_POOL_BASE const ALT_POOL_CRED const DEFAULT_MODEL const DECLARED_COST_CENTS const DEFAULT_HF_PROVIDER const ENV_HF_PROVIDER const ALT_ENV_KEYS const ENV_MODEL struct HuggingFaceProvider impl ImageGenProvider for HuggingFaceProvider enum HfCallError impl From for HfCallError
Functions
By call-graph weight (PageRank; 1.0 is the average function). 22 functions in all.
| function | kind | lines | cyclomatic | callers | callees | weight | crystal |
|---|---|---|---|---|---|---|---|
| detect_mimesrc/providers/huggingface.rs:115 | fn | 9 | 5 | 2 | 0 | 1.6 | |
| generate_via_pool_or_altsrc/providers/huggingface.rs:208 | fn | 73 | 9 | 2 | 6 | 1 | |
| resolve_modelsrc/providers/huggingface.rs:107 | fn | 7 | 1 | 3 | 1 | 1 | |
| resolve_alt_tokensrc/providers/huggingface.rs:95 | fn | 11 | 4 | 3 | 1 | 1 | |
| build_outputsrc/providers/huggingface.rs:282 | fn | 13 | 1 | 2 | 1 | 0.8 | |
| call_hf_inferencesrc/providers/huggingface.rs:307 | fn | 18 | 1 | 2 | 4 | 0.8 | |
| HuggingFaceProvider::is_availablesrc/providers/huggingface.rs:130 | trait impl | 14 | 6 | 1 | 4 | 0.7 | |
| hf_providersrc/providers/huggingface.rs:326 | fn | 7 | 1 | 1 | 1 | 0.7 | |
| hf_inference_bodysrc/providers/huggingface.rs:334 | fn | 20 | 5 | 1 | 0 | 0.7 | |
| hf_inference_bytessrc/providers/huggingface.rs:355 | fn | 41 | 7 | 1 | 1 | 0.7 | |
| generate_with_single_tokensrc/providers/huggingface.rs:188 | fn | 19 | 3 | 1 | 3 | 0.6 | |
| HuggingFaceProvider::idsrc/providers/huggingface.rs:126 | trait impl | 3 | 1 | 0 | 0 | 0.5 | |
| HuggingFaceProvider::cost_cents_per_callsrc/providers/huggingface.rs:145 | trait impl | 3 | 1 | 0 | 0 | 0.5 | |
| HuggingFaceProvider::unavailable_reasonsrc/providers/huggingface.rs:149 | trait impl | 12 | 3 | 0 | 2 | 0.5 | |
| HuggingFaceProvider::generatesrc/providers/huggingface.rs:162 | trait impl | 3 | 1 | 0 | 1 | 0.5 | |
| HuggingFaceProvider::is_available_with_contextsrc/providers/huggingface.rs:166 | trait impl | 3 | 2 | 0 | 2 | 0.5 | |
| HuggingFaceProvider::unavailable_reason_with_contextsrc/providers/huggingface.rs:170 | trait impl | 9 | 3 | 0 | 2 | 0.5 | |
| HuggingFaceProvider::generate_with_contextsrc/providers/huggingface.rs:180 | trait impl | 6 | 2 | 0 | 4 | 0.5 | |
| HfCallError::fromsrc/providers/huggingface.rs:302 | trait impl | 3 | 1 | 0 | 0 | 0.5 | |
| resolves_default_model_when_env_unsetsrc/providers/huggingface.rs:404 | fn | 6 | 1 | 0 | 2 | 0.5 | |
| detect_mime_signaturessrc/providers/huggingface.rs:412 | fn | 6 | 1 | 0 | 1 | 0.5 | |
| resolve_alt_token_prioritysrc/providers/huggingface.rs:420 | fn | 6 | 1 | 0 | 2 | 0.5 |
Source not readable from this process.