pub struct ModelHint {
pub name: Option<String>,
pub extra: Map<String, Value>,
}
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.
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 matchclaude-3-5-sonnet-20241022
sonnet
should matchclaude-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 matchclaude-3-haiku-20240307
extra: Map<String, Value>
Additional parameters that are not part of the schema.
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
impl Eq for ModelHint
impl StructuralPartialEq for ModelHint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.