pub struct ProviderRequest {
pub messages: Vec<Message>,
pub system_prompt: String,
pub tools: Vec<ToolSchema>,
pub model: String,
pub max_tokens: u32,
pub temperature: Option<f64>,
pub enable_caching: bool,
pub tool_choice: ToolChoice,
pub metadata: Option<Value>,
}Expand description
A provider-agnostic request.
Fields§
§messages: Vec<Message>§system_prompt: String§tools: Vec<ToolSchema>§model: String§max_tokens: u32§temperature: Option<f64>§enable_caching: bool§tool_choice: ToolChoiceControls whether/how the model should use tools.
metadata: Option<Value>Metadata to send with the request (e.g., user_id for Anthropic).
Auto Trait Implementations§
impl Freeze for ProviderRequest
impl RefUnwindSafe for ProviderRequest
impl Send for ProviderRequest
impl Sync for ProviderRequest
impl Unpin for ProviderRequest
impl UnsafeUnpin for ProviderRequest
impl UnwindSafe for ProviderRequest
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