pub struct ModelCapabilities {
pub supports_streaming: bool,
pub supports_function_calling: bool,
pub supports_vision: bool,
pub max_tokens: u32,
pub max_context_window: u32,
}Expand description
Capabilities of a model/provider.
Fields§
§supports_streaming: boolWhether the provider supports streaming responses
supports_function_calling: boolWhether the provider supports function/tool calling
supports_vision: boolWhether the provider supports vision/image inputs
max_tokens: u32Maximum number of tokens that can be generated
max_context_window: u32Maximum context window size (prompt + completion)
Implementations§
Source§impl ModelCapabilities
impl ModelCapabilities
Sourcepub fn new(
supports_streaming: bool,
supports_function_calling: bool,
supports_vision: bool,
max_tokens: u32,
max_context_window: u32,
) -> Self
pub fn new( supports_streaming: bool, supports_function_calling: bool, supports_vision: bool, max_tokens: u32, max_context_window: u32, ) -> Self
Create a new capabilities specification.
Sourcepub fn basic_text(max_tokens: u32, max_context_window: u32) -> Self
pub fn basic_text(max_tokens: u32, max_context_window: u32) -> Self
Create capabilities for a basic text-only model without streaming.
Sourcepub fn full_featured(max_tokens: u32, max_context_window: u32) -> Self
pub fn full_featured(max_tokens: u32, max_context_window: u32) -> Self
Create capabilities for a full-featured model.
Sourcepub fn streaming_text(max_tokens: u32, max_context_window: u32) -> Self
pub fn streaming_text(max_tokens: u32, max_context_window: u32) -> Self
Create capabilities for a streaming text model.
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 (const: unstable) · 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
impl Eq for ModelCapabilities
Source§impl PartialEq for ModelCapabilities
impl PartialEq for ModelCapabilities
Source§fn eq(&self, other: &ModelCapabilities) -> bool
fn eq(&self, other: &ModelCapabilities) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq 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 UnsafeUnpin 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