pub struct RunRequest {
pub input: UserInput,
pub options: Option<ModelOptions>,
pub metadata: RunMetadata,
}Expand description
Input and model parameters for one run.
Fields§
§input: UserInputUser input to record and send into the agent loop.
options: Option<ModelOptions>Request-scoped model options.
None uses the agent’s configured defaults. Some(options) replaces
the configured defaults for this run. Typed output schemas override
options.structured.
metadata: RunMetadataCaller-owned metadata for this run request.
Implementations§
Source§impl RunRequest
impl RunRequest
Sourcepub fn blocks(blocks: Vec<ContentBlock>) -> Self
pub fn blocks(blocks: Vec<ContentBlock>) -> Self
Constructs a multi-block request.
Sourcepub fn with_options(self, options: ModelOptions) -> Self
pub fn with_options(self, options: ModelOptions) -> Self
Sets the model options for this request.
Sourcepub fn with_metadata(self, metadata: RunMetadata) -> Self
pub fn with_metadata(self, metadata: RunMetadata) -> Self
Sets caller-owned metadata for this request.
Trait Implementations§
Source§impl Clone for RunRequest
impl Clone for RunRequest
Source§fn clone(&self) -> RunRequest
fn clone(&self) -> RunRequest
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 RunRequest
impl Debug for RunRequest
Source§impl<'de> Deserialize<'de> for RunRequest
impl<'de> Deserialize<'de> for RunRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&str> for RunRequest
impl From<&str> for RunRequest
Source§impl From<String> for RunRequest
impl From<String> for RunRequest
Source§impl From<UserInput> for RunRequest
impl From<UserInput> for RunRequest
Source§impl PartialEq for RunRequest
impl PartialEq for RunRequest
Source§impl Serialize for RunRequest
impl Serialize for RunRequest
impl StructuralPartialEq for RunRequest
Auto Trait Implementations§
impl Freeze for RunRequest
impl RefUnwindSafe for RunRequest
impl Send for RunRequest
impl Sync for RunRequest
impl Unpin for RunRequest
impl UnsafeUnpin for RunRequest
impl UnwindSafe for RunRequest
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