pub struct ChatCompletionRequest {
pub messages: Vec<ChatMessage>,
pub model: Option<String>,
pub tools: Option<Vec<ToolDefinition>>,
pub temperature: Option<f32>,
pub max_tokens: Option<u32>,
}Expand description
LLM 聊天完成请求
Fields§
§messages: Vec<ChatMessage>Messages for the chat completion
model: Option<String>Model to use
tools: Option<Vec<ToolDefinition>>Tool definitions (if tools are available)
temperature: Option<f32>Temperature
max_tokens: Option<u32>Max tokens
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 · 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 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