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§fn clone(&self) -> ModelRequest
fn clone(&self) -> ModelRequest
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 moreSource§impl Debug for ModelRequest
impl Debug for ModelRequest
Source§impl Default for ModelRequest
impl Default for ModelRequest
Source§fn default() -> ModelRequest
fn default() -> ModelRequest
Returns the “default value” for a type. Read more
Source§impl PartialEq for ModelRequest
impl PartialEq for ModelRequest
impl StructuralPartialEq for ModelRequest
Auto Trait Implementations§
impl Forget for ModelRequest
impl Freeze for ModelRequestwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Message>: Freeze,
PhantomData<ToolSpec>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
PhantomData<ToolLoad>: Freeze,
impl Move for ModelRequest
impl RefUnwindSafe for ModelRequest
impl Send for ModelRequest
impl Sync for ModelRequest
impl Unpin for ModelRequest
impl UnsafeUnpin for ModelRequestwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Message>: UnsafeUnpin,
PhantomData<ToolSpec>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
PhantomData<ToolLoad>: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more