pub struct ToolCallAction {
pub parameters: Value,
pub parameter_hash: String,
}Expand description
Describes the tool call that was evaluated.
Fields§
§parameters: ValueThe parameters that were passed to the tool (or attempted).
parameter_hash: StringSHA-256 hash of the canonical JSON of parameters.
Implementations§
Source§impl ToolCallAction
impl ToolCallAction
Sourcepub fn from_parameters(parameters: Value) -> Result<ToolCallAction, Error>
pub fn from_parameters(parameters: Value) -> Result<ToolCallAction, Error>
Construct from raw parameters, computing the hash automatically.
Sourcepub fn verify_hash(&self) -> Result<bool, Error>
pub fn verify_hash(&self) -> Result<bool, Error>
Verify that parameter_hash matches the canonical hash of parameters.
Trait Implementations§
Source§impl Clone for ToolCallAction
impl Clone for ToolCallAction
Source§fn clone(&self) -> ToolCallAction
fn clone(&self) -> ToolCallAction
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 ToolCallAction
impl Debug for ToolCallAction
Source§impl<'de> Deserialize<'de> for ToolCallAction
impl<'de> Deserialize<'de> for ToolCallAction
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolCallAction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolCallAction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ToolCallAction
impl Serialize for ToolCallAction
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
Auto Trait Implementations§
impl Freeze for ToolCallAction
impl RefUnwindSafe for ToolCallAction
impl Send for ToolCallAction
impl Sync for ToolCallAction
impl Unpin for ToolCallAction
impl UnsafeUnpin for ToolCallAction
impl UnwindSafe for ToolCallAction
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