pub struct ModelAlias {
pub harness: Option<String>,
pub description: Option<String>,
pub prompting: Option<String>,
pub default_effort: Option<EffortRequest>,
pub autocompact: Option<u32>,
pub autocompact_pct: Option<u8>,
pub spec: ModelSpec,
}Fields§
§harness: Option<String>§description: Option<String>§prompting: Option<String>§default_effort: Option<EffortRequest>§autocompact: Option<u32>§autocompact_pct: Option<u8>§spec: ModelSpecImplementations§
Source§impl ModelAlias
impl ModelAlias
pub fn pinned_model_id(&self) -> Option<&str>
Source§impl ModelAlias
impl ModelAlias
Sourcepub fn resolve(&self, rows: &[CachedModel]) -> Option<String>
pub fn resolve(&self, rows: &[CachedModel]) -> Option<String>
The id the alias resolves to over rows: a pinned model as written, else the best row
an auto alias selects. None when an auto alias selects nothing.
Sourcepub fn candidates(&self, rows: &[CachedModel]) -> Vec<String>
pub fn candidates(&self, rows: &[CachedModel]) -> Vec<String>
Every id the alias accepts, in resolve’s order: a pinned model first, then each row
match, exclude and provider select, best first. A pinned alias with no match
accepts its model alone.
Sourcepub fn selected<'a>(&self, rows: &'a [CachedModel]) -> Vec<&'a CachedModel>
pub fn selected<'a>(&self, rows: &'a [CachedModel]) -> Vec<&'a CachedModel>
The rows match, exclude and provider select; a pinned model’s provider is inferred
from its id when the alias names none.
Trait Implementations§
Source§impl Clone for ModelAlias
impl Clone for ModelAlias
Source§impl Debug for ModelAlias
impl Debug for ModelAlias
Source§impl<'de> Deserialize<'de> for ModelAlias
impl<'de> Deserialize<'de> for ModelAlias
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ModelAlias
impl PartialEq for ModelAlias
Source§impl Serialize for ModelAlias
impl Serialize for ModelAlias
impl StructuralPartialEq for ModelAlias
Auto Trait Implementations§
impl Forget for ModelAlias
impl Freeze for ModelAlias
impl Move for ModelAlias
impl RefUnwindSafe for ModelAlias
impl Send for ModelAliaswhere
RawVecInner: Send,
impl Sync for ModelAliaswhere
RawVecInner: Sync,
impl Unpin for ModelAlias
impl UnsafeUnpin for ModelAliaswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for ModelAliaswhere
RawVecInner: UnwindSafe,
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