Tighten XML tool call parsing and upstream empty handling

This commit is contained in:
CJACK
2026-04-26 01:17:16 +08:00
parent a44afb335a
commit 1b0e8cbadb
37 changed files with 273 additions and 991 deletions

View File

@@ -1,13 +1,6 @@
{
"calls": [
{
"name": "read_file",
"input": {
"path": "README.MD"
}
}
],
"sawToolCallSyntax": true,
"calls": [],
"sawToolCallSyntax": false,
"rejectedByPolicy": false,
"rejectedToolNames": []
}
}

View File

@@ -1,13 +1,6 @@
{
"calls": [
{
"name": "read_file",
"input": {
"path": "README.MD"
}
}
],
"sawToolCallSyntax": true,
"calls": [],
"sawToolCallSyntax": false,
"rejectedByPolicy": false,
"rejectedToolNames": []
}
}

View File

@@ -1,13 +1,6 @@
{
"calls": [
{
"name": "read_file",
"input": {
"path": "README.MD"
}
}
],
"sawToolCallSyntax": true,
"calls": [],
"sawToolCallSyntax": false,
"rejectedByPolicy": false,
"rejectedToolNames": []
}
}

View File

@@ -1,14 +1,6 @@
{
"calls": [
{
"name": "get_weather",
"input": {
"city": "beijing",
"unit": "c"
}
}
],
"sawToolCallSyntax": true,
"calls": [],
"sawToolCallSyntax": false,
"rejectedByPolicy": false,
"rejectedToolNames": []
}

View File

@@ -1,5 +1,5 @@
{
"text": "<function_call><function>read_file</function><parameters>{\"path\":\"README.MD\"}</parameters></function_call>",
"text": "<function_call><function>read_file</function><param>{\"path\":\"README.MD\"}</param></function_call>",
"tool_names": [
"read_file"
]

View File

@@ -1,5 +1,5 @@
{
"text": "<tool_call><name>read_file</name><arguments>{\"path\":\"README.MD\"}</arguments></tool_call>",
"text": "<tool><tool_name>read_file</tool_name><arguments>{\"path\":\"README.MD\"}</arguments></tool>",
"tool_names": [
"read_file"
]

View File

@@ -1,5 +1,5 @@
{
"text": "<tool_call><tool_name>get_weather</tool_name><parameters>{\"city\":\"beijing\",\"unit\":\"c\"}</parameters></tool_call>",
"text": "<tool><tool_name>get_weather</tool_name><param>{\"city\":\"beijing\",\"unit\":\"c\"}</param></tool>",
"tool_names": [
"get_weather"
]