mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-13 12:47:41 +08:00
fix: align tool call protocol and thinking controls
This commit is contained in:
14
tests/compat/expected/toolcalls_canonical_nested_param.json
Normal file
14
tests/compat/expected/toolcalls_canonical_nested_param.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"calls": [
|
||||
{
|
||||
"name": "get_weather",
|
||||
"input": {
|
||||
"city": "beijing",
|
||||
"unit": "c"
|
||||
}
|
||||
}
|
||||
],
|
||||
"sawToolCallSyntax": true,
|
||||
"rejectedByPolicy": false,
|
||||
"rejectedToolNames": []
|
||||
}
|
||||
13
tests/compat/expected/toolcalls_canonical_tool_call.json
Normal file
13
tests/compat/expected/toolcalls_canonical_tool_call.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"calls": [
|
||||
{
|
||||
"name": "read_file",
|
||||
"input": {
|
||||
"path": "README.MD"
|
||||
}
|
||||
}
|
||||
],
|
||||
"sawToolCallSyntax": true,
|
||||
"rejectedByPolicy": false,
|
||||
"rejectedToolNames": []
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"calls": [],
|
||||
"sawToolCallSyntax": false,
|
||||
"rejectedByPolicy": false,
|
||||
"rejectedToolNames": []
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"calls": [],
|
||||
"sawToolCallSyntax": false,
|
||||
"rejectedByPolicy": false,
|
||||
"rejectedToolNames": []
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"calls": [],
|
||||
"sawToolCallSyntax": false,
|
||||
"rejectedByPolicy": false,
|
||||
"rejectedToolNames": []
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"calls": [],
|
||||
"sawToolCallSyntax": false,
|
||||
"rejectedByPolicy": false,
|
||||
"rejectedToolNames": []
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"text": "<tool_calls><invoke name=\"get_weather\"><parameter name=\"city\"><![CDATA[beijing]]></parameter><parameter name=\"unit\"><![CDATA[c]]></parameter></invoke></tool_calls>",
|
||||
"tool_names": [
|
||||
"get_weather"
|
||||
]
|
||||
}
|
||||
6
tests/compat/fixtures/toolcalls/canonical_tool_call.json
Normal file
6
tests/compat/fixtures/toolcalls/canonical_tool_call.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"text": "<tool_calls><invoke name=\"read_file\"><parameter name=\"path\">README.MD</parameter></invoke></tool_calls>",
|
||||
"tool_names": [
|
||||
"read_file"
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"text": "<function_call><function>read_file</function><param>{\"path\":\"README.MD\"}</param></function_call>",
|
||||
"tool_names": [
|
||||
"read_file"
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"text": "<invoke name=\"read_file\"><argument>{\"path\":\"README.MD\"}</argument></invoke>",
|
||||
"tool_names": [
|
||||
"read_file"
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"text": "<tool><tool_name>read_file</tool_name><arguments>{\"path\":\"README.MD\"}</arguments></tool>",
|
||||
"tool_names": [
|
||||
"read_file"
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"text": "<tool><tool_name>get_weather</tool_name><param>{\"city\":\"beijing\",\"unit\":\"c\"}</param></tool>",
|
||||
"tool_names": [
|
||||
"get_weather"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user