handle empty objects returned by tool calls, also remove misinterpretation of the tools calls instruct tag within ChatML autoguess

This commit is contained in:
Concedo 2025-07-25 22:22:27 +08:00
parent b7b3e0d2a7
commit f25339c92b
2 changed files with 10 additions and 5 deletions

View file

@ -19,9 +19,7 @@
"user_start": "<|im_start|>user\n",
"user_end": "<|im_end|>\n",
"assistant_start": "<|im_start|>assistant\n",
"assistant_end": "<|im_end|>\n",
"tools_start": "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n\n<tools>\n",
"tools_end": "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n"
"assistant_end": "<|im_end|>\n"
}
}, {
"search": ["<|im_user|>user<|im_middle|>", "<|im_assistant|>assistant<|im_middle|>", "<|im_end|>"],