pub struct ChatRequest {
pub system: String,
pub messages: Vec<Message>,
pub tools: Option<Vec<Tool>>,
pub max_tokens: u32,
pub max_tokens_explicit: bool,
pub session_id: Option<String>,
pub cached_content: Option<String>,
pub thinking: Option<ThinkingConfig>,
}Fields§
§system: String§messages: Vec<Message>§tools: Option<Vec<Tool>>§max_tokens: u32§max_tokens_explicit: boolWhether max_tokens was explicitly configured by the caller.
session_id: Option<String>Optional session identifier for provider-side prompt caching or routing.
cached_content: Option<String>Optional provider-managed cached content reference.
This currently maps to Gemini / Vertex AI cachedContent handles.
thinking: Option<ThinkingConfig>Optional extended thinking configuration.
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