pub struct InvocableRequest {
pub input: Value,
pub session_id: Option<SessionId>,
pub turn_id: Option<TurnId>,
pub metadata: MetadataMap,
}Expand description
A request to execute an Invocable capability.
Created by the agentkit loop when the model emits a tool-call that targets
a registered invocable. The input field contains the arguments the model
provided, validated against the capability’s InvocableSpec::input_schema.
Fields§
§input: ValueThe JSON input arguments provided by the model.
session_id: Option<SessionId>The session in which this invocation occurs, if available.
turn_id: Option<TurnId>The turn within the session, if available.
metadata: MetadataMapArbitrary key-value metadata attached to this request.
Implementations§
Source§impl InvocableRequest
impl InvocableRequest
Sourcepub fn with_session(self, session_id: impl Into<SessionId>) -> Self
pub fn with_session(self, session_id: impl Into<SessionId>) -> Self
Sets the session id.
Sourcepub fn with_metadata(self, metadata: MetadataMap) -> Self
pub fn with_metadata(self, metadata: MetadataMap) -> Self
Replaces the request metadata.
Trait Implementations§
Source§impl Clone for InvocableRequest
impl Clone for InvocableRequest
Source§fn clone(&self) -> InvocableRequest
fn clone(&self) -> InvocableRequest
Returns a duplicate of the value. Read more
1.0.0 · 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 InvocableRequest
impl Debug for InvocableRequest
Source§impl<'de> Deserialize<'de> for InvocableRequest
impl<'de> Deserialize<'de> for InvocableRequest
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 PartialEq for InvocableRequest
impl PartialEq for InvocableRequest
Source§impl Serialize for InvocableRequest
impl Serialize for InvocableRequest
impl StructuralPartialEq for InvocableRequest
Auto Trait Implementations§
impl Freeze for InvocableRequest
impl RefUnwindSafe for InvocableRequest
impl Send for InvocableRequest
impl Sync for InvocableRequest
impl Unpin for InvocableRequest
impl UnsafeUnpin for InvocableRequest
impl UnwindSafe for InvocableRequest
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