pub trait ModelInfo:
Send
+ Sync
+ Debug
+ Clone
+ Copy {
// Required methods
fn context_window(&self) -> usize;
fn max_output_tokens(&self) -> usize;
}Expand description
Model that can be converted to a string ID for API requests
Required Methods§
Sourcefn context_window(&self) -> usize
fn context_window(&self) -> usize
Context window size in tokens
Sourcefn max_output_tokens(&self) -> usize
fn max_output_tokens(&self) -> usize
Maximum number of output tokens NOTE: we may want to do something smart here to have this be context-dependent. for example if you set the right headers for anthropic, 3.7 can output 128k instead of 64k.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.