pub struct OpenAiToolCall {
pub id: String,
pub name: String,
pub arguments: Value,
}Expand description
A tool invocation requested by the model: an id, tool name, and JSON arguments.
Fields§
§id: StringProvider-assigned call id correlating the call with its result.
name: StringOpenAI tool name being invoked.
arguments: ValueArguments supplied for the call as a JSON value.
Implementations§
Source§impl OpenAiToolCall
impl OpenAiToolCall
Sourcepub fn from_content_part(part: &Expr) -> Result<Option<Self>>
pub fn from_content_part(part: &Expr) -> Result<Option<Self>>
Extracts a tool call from a transcript content part, returning None
when the part is not a tool-call map.
Sourcepub fn fingerprint(&self) -> String
pub fn fingerprint(&self) -> String
Returns a stable name:arguments fingerprint for deduplicating calls.
Trait Implementations§
Source§impl Clone for OpenAiToolCall
impl Clone for OpenAiToolCall
Source§fn clone(&self) -> OpenAiToolCall
fn clone(&self) -> OpenAiToolCall
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 OpenAiToolCall
impl Debug for OpenAiToolCall
Source§impl PartialEq for OpenAiToolCall
impl PartialEq for OpenAiToolCall
Source§fn eq(&self, other: &OpenAiToolCall) -> bool
fn eq(&self, other: &OpenAiToolCall) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OpenAiToolCall
Auto Trait Implementations§
impl Freeze for OpenAiToolCall
impl RefUnwindSafe for OpenAiToolCall
impl Send for OpenAiToolCall
impl Sync for OpenAiToolCall
impl Unpin for OpenAiToolCall
impl UnsafeUnpin for OpenAiToolCall
impl UnwindSafe for OpenAiToolCall
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