pub struct ChatOptions {
pub max_tokens: Option<u32>,
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub top_k: Option<u32>,
pub stop: Option<Vec<String>>,
pub stream: Option<bool>,
pub tool_choice: Option<ToolChoice>,
}Expand description
Options for chat completion
Fields§
§max_tokens: Option<u32>Maximum tokens to generate
temperature: Option<f32>Temperature for generation
top_p: Option<f32>Top-p sampling parameter
top_k: Option<u32>Top-k sampling parameter
stop: Option<Vec<String>>Stop sequences
stream: Option<bool>Whether to stream the response
tool_choice: Option<ToolChoice>Tool choice strategy
Trait Implementations§
Source§impl Clone for ChatOptions
impl Clone for ChatOptions
Source§fn clone(&self) -> ChatOptions
fn clone(&self) -> ChatOptions
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 ChatOptions
impl Debug for ChatOptions
Source§impl Default for ChatOptions
impl Default for ChatOptions
Source§impl<'de> Deserialize<'de> for ChatOptions
impl<'de> Deserialize<'de> for ChatOptions
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
Auto Trait Implementations§
impl Freeze for ChatOptions
impl RefUnwindSafe for ChatOptions
impl Send for ChatOptions
impl Sync for ChatOptions
impl Unpin for ChatOptions
impl UnwindSafe for ChatOptions
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