pub struct PromptToolCall {
pub index: Option<u32>,
pub id: String,
pub tool_type: String,
pub function: PromptFunctionCall,
}Expand description
Tool-call shape exposed to model chat templates.
OpenAI’s wire format serializes function.arguments as a JSON string, but
HuggingFace chat templates generally expect a parsed mapping so they can
apply tojson, items, and similar template operations. Keep that internal
shape separate from the API response type.
Fields§
§index: Option<u32>§id: String§tool_type: String§function: PromptFunctionCallTrait Implementations§
Source§impl Clone for PromptToolCall
impl Clone for PromptToolCall
Source§fn clone(&self) -> PromptToolCall
fn clone(&self) -> PromptToolCall
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 PromptToolCall
impl Debug for PromptToolCall
Source§impl From<&ChatToolCall> for PromptToolCall
impl From<&ChatToolCall> for PromptToolCall
Source§fn from(call: &ChatToolCall) -> Self
fn from(call: &ChatToolCall) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PromptToolCall
impl RefUnwindSafe for PromptToolCall
impl Send for PromptToolCall
impl Sync for PromptToolCall
impl Unpin for PromptToolCall
impl UnsafeUnpin for PromptToolCall
impl UnwindSafe for PromptToolCall
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