Expand description
Minimal HuggingFace tree-listing helper used by outrig config init.
Returns each file’s path and size so the picker can display
human-readable sizes alongside filenames – mistralrs users tell
quantizations apart by file size as much as by name. Hits HF’s
/api/models/{id}/tree/{revision} directly via reqwest (rather
than hf-hub::Api::info(), which only exposes filenames).
The local-llm feature pulls in reqwest for the real implementation.
Builds without the feature still get the trait plus an Unavailable
impl that always errors – so the init flow can prompt for model-file
as free-form text without compiling against reqwest.
Structs§
- HfFile
- One file in a HuggingFace repo, projected into the fields the picker
needs.
sizeis the file’s byte count when known (HF’s tree endpoint reports it for every regular file; the field staysOptionso future API quirks don’t break the picker). - Unavailable
HfTree Fetcher - Always-fails fetcher used when the
local-llmfeature is off (or by callers that explicitly want to bypass the network). Returns a configuration error the prompt flow recognizes as “fall back to the free-form text prompt”.
Enums§
Traits§
Functions§
- auto
- Pick a fetcher appropriate for the current build. Mirrors the
init::prompt::autofactory. - filter_
gguf - Filter to
.gguffiles only, sorted by path. - format_
size - Render a byte count as a human-readable string (e.g. “1.4 GiB”).