pub struct ChatRequest {
pub messages: Vec<ChatMessage>,
pub system: Option<String>,
pub tools: Vec<ToolDefinition>,
pub response_format: ResponseFormat,
pub max_tokens: Option<u32>,
pub temperature: Option<f32>,
pub stop_sequences: Vec<String>,
pub model: Option<String>,
}Expand description
Request for chat completion.
Fields§
§messages: Vec<ChatMessage>§system: Option<String>§tools: Vec<ToolDefinition>§response_format: ResponseFormat§max_tokens: Option<u32>§temperature: Option<f32>§stop_sequences: Vec<String>§model: Option<String>Trait Implementations§
Source§impl Clone for ChatRequest
impl Clone for ChatRequest
Source§fn clone(&self) -> ChatRequest
fn clone(&self) -> ChatRequest
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 moreAuto Trait Implementations§
impl Freeze for ChatRequest
impl RefUnwindSafe for ChatRequest
impl Send for ChatRequest
impl Sync for ChatRequest
impl Unpin for ChatRequest
impl UnsafeUnpin for ChatRequest
impl UnwindSafe for ChatRequest
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