pub enum ChatMaxTokensField {
MaxCompletionTokens,
MaxTokens,
}Expand description
The Chat Completions request field that carries the output limit.
Serialized as the wire field name. Exhaustive: the Chat renderer is total over it, so a new variant is a breaking change.
Variants§
MaxCompletionTokens
max_completion_tokens, the field OpenAI documents. It counts
reasoning tokens as well as visible output.
MaxTokens
max_tokens, the older name, which OpenAI has deprecated and which
some compatible servers still read in its place.
Implementations§
Source§impl ChatMaxTokensField
impl ChatMaxTokensField
Sourcepub fn field_name(self) -> &'static str
pub fn field_name(self) -> &'static str
The request field name this value writes.
Trait Implementations§
Source§impl Clone for ChatMaxTokensField
impl Clone for ChatMaxTokensField
impl Copy for ChatMaxTokensField
Source§impl Debug for ChatMaxTokensField
impl Debug for ChatMaxTokensField
Source§impl Default for ChatMaxTokensField
impl Default for ChatMaxTokensField
Source§impl<'de> Deserialize<'de> for ChatMaxTokensField
impl<'de> Deserialize<'de> for ChatMaxTokensField
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 ChatMaxTokensField
Source§impl PartialEq for ChatMaxTokensField
impl PartialEq for ChatMaxTokensField
Source§impl Serialize for ChatMaxTokensField
impl Serialize for ChatMaxTokensField
impl StructuralPartialEq for ChatMaxTokensField
Auto Trait Implementations§
impl Forget for ChatMaxTokensField
impl Freeze for ChatMaxTokensField
impl Move for ChatMaxTokensField
impl RefUnwindSafe for ChatMaxTokensField
impl Send for ChatMaxTokensField
impl Sync for ChatMaxTokensField
impl Unpin for ChatMaxTokensField
impl UnsafeUnpin for ChatMaxTokensField
impl UnwindSafe for ChatMaxTokensField
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