pub struct ModelRequest {
pub model: String,
pub messages: Vec<Message>,
pub tools: Vec<ToolSpec>,
pub tool_choice: ToolChoice,
pub max_output_tokens: Option<u32>,
pub options: RequestOptions,
pub tool_surfacing: Option<ToolSurfacing>,
}Expand description
One provider call. Hooks may edit it in crate::Hook::before_model.
Fields§
§model: String§messages: Vec<Message>Instructions first (stable, cacheable), then the transcript.
tools: Vec<ToolSpec>§tool_choice: ToolChoice§max_output_tokens: Option<u32>§options: RequestOptions§tool_surfacing: Option<ToolSurfacing>The run’s deferred tools, for providers that keep a fixed tool block
and surface loaded tools in the transcript; None for a run with no
deferred tools.
Trait Implementations§
Source§impl Clone for ModelRequest
impl Clone for ModelRequest
Source§impl Debug for ModelRequest
impl Debug for ModelRequest
Source§impl Default for ModelRequest
impl Default for ModelRequest
Source§impl PartialEq for ModelRequest
impl PartialEq for ModelRequest
impl StructuralPartialEq for ModelRequest
Auto Trait Implementations§
impl Forget for ModelRequest
impl Freeze for ModelRequest
impl Move for ModelRequest
impl RefUnwindSafe for ModelRequest
impl Send for ModelRequest
impl Sync for ModelRequest
impl Unpin for ModelRequest
impl UnsafeUnpin for ModelRequest
impl UnwindSafe for ModelRequest
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