Spaces:
Paused
Paused
Commit History
-
refactor: simplify tool system prompt for better compliance
Rewrite tool injection prompt to be more concise and authoritative, framing it as an integrated runtime capability rather than verbose rules. Strengthen tool_choice enforcement wording.fddf449 -
fix: improve tool calling reliability with multi-format parsing and Delta pointer fix
- Enhance system prompt with Chinese instructions and few-shot examples for more reliable <tool_call> output from GLM models - Add fallback parsing for [TOOL]...[/TOOL], [TOOL_CALL]...[/TOOL_CALL], and markdown JSON block formats in prompt injection mode - Change Choice.Delta to *Delta pointer so omitempty correctly omits the field in non-streaming responses (fixes extra "delta":{} in JSON) - Convert tool_calls/tool messages to plain text for upstream z.ai API which doesn't support native tools field - Add comprehensive tests for all new parsing formats and serialization8646505 -
feat: support tool/function calling (OpenAI compatible)
Add tools and tool_choice fields to chat requests, parse upstream tool_call responses, and return them in OpenAI-compatible format with finish_reason=tool_calls. Includes builtin tools, test script, and unit tests.5a55e77