pub struct ModelLimit {
pub context: u64,
pub output: u64,
}Expand description
Token limits for the model
Fields§
§context: u64Maximum context window size in tokens
output: u64Maximum output tokens
Implementations§
Source§impl ModelLimit
impl ModelLimit
Sourcepub fn new(context: u64, output: u64) -> ModelLimit
pub fn new(context: u64, output: u64) -> ModelLimit
Create a new limit struct
Trait Implementations§
Source§impl Clone for ModelLimit
impl Clone for ModelLimit
Source§fn clone(&self) -> ModelLimit
fn clone(&self) -> ModelLimit
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 ModelLimit
impl Debug for ModelLimit
Source§impl Default for ModelLimit
impl Default for ModelLimit
Source§fn default() -> ModelLimit
fn default() -> ModelLimit
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModelLimit
impl<'de> Deserialize<'de> for ModelLimit
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelLimit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelLimit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ModelLimit
impl PartialEq for ModelLimit
Source§impl Serialize for ModelLimit
impl Serialize for ModelLimit
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ModelLimit
Auto Trait Implementations§
impl Freeze for ModelLimit
impl RefUnwindSafe for ModelLimit
impl Send for ModelLimit
impl Sync for ModelLimit
impl Unpin for ModelLimit
impl UnwindSafe for ModelLimit
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request