Expand description
XML tool definition injection for instruction-tuned models.
Models that lack native tool calling support can still use tools by having
the tool definitions injected into the system prompt as XML. The model is
then instructed to emit <tool_call> blocks that the super::tool_extractor
can parse from the streaming text output.
Functionsยง
- inject_
tools_ into_ system_ prompt - Inject XML tool definitions into the system prompt of an
super::LlmRequest. - tools_
to_ xml - Convert OpenAI-format tool definitions to an XML block suitable for system prompt injection.