pub enum ToolCallFormat {
Qwen3Xml,
Qwen35XmlParam,
LlamaJson,
MistralJson,
None,
}Expand description
Model-specific tool call syntax.
Determines which markers to scan for in streaming token output. Unified enum — replaces duplicates in chat_app.rs and api/tools.rs.
Variants§
Qwen3Xml
Qwen3 XML: <tool_call>{"name":…,"arguments":…}</tool_call>
Qwen35XmlParam
Qwen3.5 XML parameter format:
<tool_call><function=NAME><parameter=KEY>value</parameter>…</function></tool_call>
LlamaJson
Llama 3.1+: <|python_tag|> prefix + JSON
MistralJson
Mistral: [TOOL_CALLS] prefix + JSON array
None
Model does not support tool calling.
Implementations§
Trait Implementations§
Source§impl Clone for ToolCallFormat
impl Clone for ToolCallFormat
Source§fn clone(&self) -> ToolCallFormat
fn clone(&self) -> ToolCallFormat
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 ToolCallFormat
impl Debug for ToolCallFormat
Source§impl Default for ToolCallFormat
impl Default for ToolCallFormat
Source§fn default() -> ToolCallFormat
fn default() -> ToolCallFormat
Returns the “default value” for a type. Read more
Source§impl PartialEq for ToolCallFormat
impl PartialEq for ToolCallFormat
Source§fn eq(&self, other: &ToolCallFormat) -> bool
fn eq(&self, other: &ToolCallFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ToolCallFormat
impl Eq for ToolCallFormat
impl StructuralPartialEq for ToolCallFormat
Auto Trait Implementations§
impl Freeze for ToolCallFormat
impl RefUnwindSafe for ToolCallFormat
impl Send for ToolCallFormat
impl Sync for ToolCallFormat
impl Unpin for ToolCallFormat
impl UnsafeUnpin for ToolCallFormat
impl UnwindSafe for ToolCallFormat
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