Expand description
Legacy parser for text-based tool calls from DeepSeek models.
Structured tool-call items are preferred, so the engine no longer invokes this parser. It is kept for reference/debugging.
Some DeepSeek outputs tool calls as text in various formats:
[TOOL_CALL]
{tool => "tool_name", args => {...}}
[/TOOL_CALL]Or XML-style format:
<deepseek:tool_call>
<invoke name="tool_name">
<parameter name="arg">value</parameter>
</invoke>
</deepseek:tool_call>This module parses these text patterns into structured tool calls.
Structs§
- Parse
Result - Result of parsing text for tool calls.
- Parsed
Tool Call - A parsed tool call from text content.
Functions§
- has_
tool_ call_ markers - Check if text contains tool call markers (either format).
- parse_
tool_ calls - Parse tool calls from text content. Returns the clean text (with markers removed) and any parsed tool calls.