pub struct ChatCompletionRequest {Show 16 fields
pub model: String,
pub messages: Vec<Message>,
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub max_tokens: Option<u32>,
pub stream: bool,
pub tools: Vec<Tool>,
pub tool_choice: Option<ToolChoice>,
pub response_format: Option<ResponseFormat>,
pub stop: Vec<String>,
pub presence_penalty: Option<f32>,
pub frequency_penalty: Option<f32>,
pub n: Option<u32>,
pub seed: Option<i64>,
pub user: Option<String>,
pub tt_extras: HashMap<String, Value>,
}Fields§
§model: String§messages: Vec<Message>§temperature: Option<f32>§top_p: Option<f32>§max_tokens: Option<u32>§stream: bool§tools: Vec<Tool>§tool_choice: Option<ToolChoice>§response_format: Option<ResponseFormat>§stop: Vec<String>§presence_penalty: Option<f32>§frequency_penalty: Option<f32>§n: Option<u32>§seed: Option<i64>§user: Option<String>§tt_extras: HashMap<String, Value>TokenTrimmer-internal extras (cache config, route hints, etc.) that are stripped before forwarding to the provider.
Trait Implementations§
Source§impl Clone for ChatCompletionRequest
impl Clone for ChatCompletionRequest
Source§fn clone(&self) -> ChatCompletionRequest
fn clone(&self) -> ChatCompletionRequest
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 ChatCompletionRequest
impl Debug for ChatCompletionRequest
Source§impl Default for ChatCompletionRequest
impl Default for ChatCompletionRequest
Source§fn default() -> ChatCompletionRequest
fn default() -> ChatCompletionRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ChatCompletionRequest
impl<'de> Deserialize<'de> for ChatCompletionRequest
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 ChatCompletionRequest
impl RefUnwindSafe for ChatCompletionRequest
impl Send for ChatCompletionRequest
impl Sync for ChatCompletionRequest
impl Unpin for ChatCompletionRequest
impl UnsafeUnpin for ChatCompletionRequest
impl UnwindSafe for ChatCompletionRequest
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