pub struct ModelHint {
pub name: Option<String>,
}
Expand description
Hints to use for model selection. Keys not declared here are currently left unspecified by the spec and are up to the client to interpret.
JSON schema
{
"description": "Hints to use for model selection.\n\nKeys not declared here are currently left unspecified by the spec and are up\nto the client to interpret.",
"type": "object",
"properties": {
"name": {
"description": "A hint for a model name.\n\nThe client SHOULD treat this as a substring of a model name; for example:\n - claude-3-5-sonnet should match claude-3-5-sonnet-20241022\n - sonnet should match claude-3-5-sonnet-20241022, claude-3-sonnet-20240229, etc.\n - claude should match any Claude model\n\nThe client MAY also map the string to a different provider's model name or a different model family, as long as it fills a similar niche; for example:\n - gemini-1.5-flash could match claude-3-haiku-20240307",
"type": "string"
}
}
}
Fields§
§name: Option<String>
A hint for a model name. The client SHOULD treat this as a substring of a model name; for example: - claude-3-5-sonnet should match claude-3-5-sonnet-20241022 - sonnet should match claude-3-5-sonnet-20241022, claude-3-sonnet-20240229, etc. - claude should match any Claude model The client MAY also map the string to a different provider’s model name or a different model family, as long as it fills a similar niche; for example: - gemini-1.5-flash could match claude-3-haiku-20240307
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelHint
impl<'de> Deserialize<'de> for ModelHint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ModelHint
impl RefUnwindSafe for ModelHint
impl Send for ModelHint
impl Sync for ModelHint
impl Unpin for ModelHint
impl UnwindSafe for ModelHint
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