pub struct RunRequest {
pub input: UserInput,
pub options: Option<ModelOptions>,
pub metadata: BTreeMap<String, Value>,
}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: BTreeMap<String, Value>Caller-owned metadata for this run request.
Implementations§
Source§impl RunRequest
impl RunRequest
Sourcepub fn text(input: impl Into<String>) -> RunRequest
pub fn text(input: impl Into<String>) -> RunRequest
Constructs a text request.
Sourcepub fn blocks(blocks: Vec<ContentBlock>) -> RunRequest
pub fn blocks(blocks: Vec<ContentBlock>) -> RunRequest
Constructs a multi-block request.
Sourcepub fn with_options(self, options: ModelOptions) -> RunRequest
pub fn with_options(self, options: ModelOptions) -> RunRequest
Sets the model options for this request.
Sourcepub fn with_metadata(self, metadata: BTreeMap<String, Value>) -> RunRequest
pub fn with_metadata(self, metadata: BTreeMap<String, Value>) -> RunRequest
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<RunRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RunRequest, <__D as Deserializer<'de>>::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§fn from(input: &str) -> RunRequest
fn from(input: &str) -> RunRequest
Converts to this type from the input type.
Source§impl From<String> for RunRequest
impl From<String> for RunRequest
Source§fn from(input: String) -> RunRequest
fn from(input: String) -> RunRequest
Converts to this type from the input type.
Source§impl From<UserInput> for RunRequest
impl From<UserInput> for RunRequest
Source§fn from(input: UserInput) -> RunRequest
fn from(input: UserInput) -> RunRequest
Converts to this type from the input type.
Source§impl PartialEq for RunRequest
impl PartialEq for RunRequest
Source§impl Serialize for RunRequest
impl Serialize for RunRequest
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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