pub struct ModelCapabilities {
pub model_type: ModelType,
pub supports_tools: bool,
pub supports_streaming: bool,
pub supports_vision: bool,
pub max_context_tokens: Option<u32>,
pub max_output_tokens: Option<u32>,
pub supported_temperatures: Option<Vec<f32>>,
pub supports_chat_api: bool,
pub supports_completions_api: bool,
pub supports_responses_api: bool,
}Expand description
Defines the capabilities and parameter requirements for a model.
Fields§
§model_type: ModelType§supports_tools: bool§supports_streaming: bool§supports_vision: bool§max_context_tokens: Option<u32>§max_output_tokens: Option<u32>§supported_temperatures: Option<Vec<f32>>None means all temperatures supported, empty vec means no temperature parameter allowed
supports_chat_api: bool§supports_completions_api: bool§supports_responses_api: boolImplementations§
Source§impl ModelCapabilities
impl ModelCapabilities
Sourcepub fn get_token_limit_param(&self) -> &'static str
pub fn get_token_limit_param(&self) -> &'static str
Get the correct parameter name for token limits based on model type.
Sourcepub fn supports_temperature(&self, temperature: f32) -> bool
pub fn supports_temperature(&self, temperature: f32) -> bool
Check if the model supports a specific temperature value.
Trait Implementations§
Source§impl Clone for ModelCapabilities
impl Clone for ModelCapabilities
Source§fn clone(&self) -> ModelCapabilities
fn clone(&self) -> ModelCapabilities
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelCapabilities
impl Debug for ModelCapabilities
Auto Trait Implementations§
impl Freeze for ModelCapabilities
impl RefUnwindSafe for ModelCapabilities
impl Send for ModelCapabilities
impl Sync for ModelCapabilities
impl Unpin for ModelCapabilities
impl UnwindSafe for ModelCapabilities
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