tools: return empty arguments object instead of null (#11113)

This commit is contained in:
Jeffrey Morgan
2025-06-18 05:20:43 -07:00
committed by GitHub
parent 6bda1d2479
commit 55bbf3b4a1
2 changed files with 17 additions and 12 deletions

View File

@@ -190,8 +190,9 @@ func TestParser(t *testing.T) {
calls: []api.ToolCall{
{
Function: api.ToolCallFunction{
Index: 0,
Name: "say_hello",
Index: 0,
Name: "say_hello",
Arguments: api.ToolCallFunctionArguments{},
},
},
},
@@ -265,8 +266,9 @@ func TestParser(t *testing.T) {
calls: []api.ToolCall{
{
Function: api.ToolCallFunction{
Index: 0,
Name: "say_hello",
Index: 0,
Name: "say_hello",
Arguments: api.ToolCallFunctionArguments{},
},
},
{
@@ -413,8 +415,9 @@ func TestParser(t *testing.T) {
calls: []api.ToolCall{
{
Function: api.ToolCallFunction{
Index: 0,
Name: "say_hello",
Index: 0,
Name: "say_hello",
Arguments: api.ToolCallFunctionArguments{},
},
},
},
@@ -441,8 +444,9 @@ func TestParser(t *testing.T) {
calls: []api.ToolCall{
{
Function: api.ToolCallFunction{
Index: 0,
Name: "say_hello",
Index: 0,
Name: "say_hello",
Arguments: api.ToolCallFunctionArguments{},
},
},
},
@@ -577,8 +581,9 @@ func TestParser(t *testing.T) {
calls: []api.ToolCall{
{
Function: api.ToolCallFunction{
Index: 0,
Name: "say_hello",
Index: 0,
Name: "say_hello",
Arguments: api.ToolCallFunctionArguments{},
},
},
},