pub struct ModelResolver { /* private fields */ }Expand description
Resolves model identifiers to local filesystem paths.
Implementations§
Source§impl ModelResolver
impl ModelResolver
Sourcepub async fn resolve(&mut self, requested_id: &str) -> Result<ResolvedModel>
pub async fn resolve(&mut self, requested_id: &str) -> Result<ResolvedModel>
Resolve a model identifier to a local filesystem path.
§Arguments
requested_id- Model identifier, which can be:- Local path:
/path/to/modelor./relative/path - HF repo ID:
meta-llama/Llama-3.1-8B-Instruct
- Local path:
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear the resolution cache.
Auto Trait Implementations§
impl Freeze for ModelResolver
impl !RefUnwindSafe for ModelResolver
impl Send for ModelResolver
impl Sync for ModelResolver
impl Unpin for ModelResolver
impl UnsafeUnpin for ModelResolver
impl !UnwindSafe for ModelResolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more