pub struct ChatRequest {
pub messages: Vec<Message>,
pub tools: Vec<ToolDefinition>,
pub system: Option<String>,
pub think: bool,
pub max_tokens: u32,
pub server_tools: Vec<ServerTool>,
pub enable_caching: bool,
}Fields§
§messages: Vec<Message>§tools: Vec<ToolDefinition>§system: Option<String>§think: bool§max_tokens: u32Maximum output tokens for the response.
server_tools: Vec<ServerTool>Server-side tools that are executed by the API provider.
enable_caching: boolEnable prompt caching for Anthropic provider.
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 (const: unstable) · 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