diff --git a/pkg/builtin/builtin.go b/pkg/builtin/builtin.go index 228ffb66..819f6f20 100644 --- a/pkg/builtin/builtin.go +++ b/pkg/builtin/builtin.go @@ -114,7 +114,7 @@ var tools = map[string]types.Tool{ Parameters: types.Parameters{ Description: "Concludes the conversation. This can not be used to ask a question.", Arguments: types.ObjectSchema( - "summary", "A summary of the dialog", + "return", "The instructed value to return or a summary of the dialog if no value is instructed", ), }, BuiltinFunc: SysChatFinish, @@ -640,7 +640,7 @@ func (e *ErrChatFinish) Error() string { func SysChatFinish(ctx context.Context, env []string, input string) (string, error) { var params struct { - Message string `json:"summary,omitempty"` + Message string `json:"return,omitempty"` } if err := json.Unmarshal([]byte(input), ¶ms); err != nil { return "", &ErrChatFinish{ diff --git a/pkg/tests/runner_test.go b/pkg/tests/runner_test.go index ea450b53..700d965a 100644 --- a/pkg/tests/runner_test.go +++ b/pkg/tests/runner_test.go @@ -64,7 +64,7 @@ func TestDualSubChat(t *testing.T) { r.RespondWith(tester.Result{ Func: types.CompletionFunctionCall{ Name: types.ToolNormalizer("sys.chat.finish"), - Arguments: `{"summary":"Chat done"}`, + Arguments: `{"return":"Chat done"}`, }, }) @@ -89,7 +89,7 @@ func TestDualSubChat(t *testing.T) { r.RespondWith(tester.Result{ Func: types.CompletionFunctionCall{ Name: types.ToolNormalizer("sys.chat.finish"), - Arguments: `{"summary":"Chat done2"}`, + Arguments: `{"return":"Chat done2"}`, }, }, tester.Result{ Text: "And we're done", diff --git a/pkg/tests/testdata/TestContextSubChat/call2.golden b/pkg/tests/testdata/TestContextSubChat/call2.golden index 18ef5c00..2d29bfc8 100644 --- a/pkg/tests/testdata/TestContextSubChat/call2.golden +++ b/pkg/tests/testdata/TestContextSubChat/call2.golden @@ -9,8 +9,8 @@ "description": "Concludes the conversation. This can not be used to ask a question.", "parameters": { "properties": { - "summary": { - "description": "A summary of the dialog", + "return": { + "description": "The instructed value to return or a summary of the dialog if no value is instructed", "type": "string" } }, diff --git a/pkg/tests/testdata/TestContextSubChat/call3.golden b/pkg/tests/testdata/TestContextSubChat/call3.golden index 095b280d..cf2a4c29 100644 --- a/pkg/tests/testdata/TestContextSubChat/call3.golden +++ b/pkg/tests/testdata/TestContextSubChat/call3.golden @@ -9,8 +9,8 @@ "description": "Concludes the conversation. This can not be used to ask a question.", "parameters": { "properties": { - "summary": { - "description": "A summary of the dialog", + "return": { + "description": "The instructed value to return or a summary of the dialog if no value is instructed", "type": "string" } }, diff --git a/pkg/tests/testdata/TestContextSubChat/call7.golden b/pkg/tests/testdata/TestContextSubChat/call7.golden index ff4a2842..d12c4297 100644 --- a/pkg/tests/testdata/TestContextSubChat/call7.golden +++ b/pkg/tests/testdata/TestContextSubChat/call7.golden @@ -9,8 +9,8 @@ "description": "Concludes the conversation. This can not be used to ask a question.", "parameters": { "properties": { - "summary": { - "description": "A summary of the dialog", + "return": { + "description": "The instructed value to return or a summary of the dialog if no value is instructed", "type": "string" } }, diff --git a/pkg/tests/testdata/TestContextSubChat/call8.golden b/pkg/tests/testdata/TestContextSubChat/call8.golden index 5c647cbd..8cbffd87 100644 --- a/pkg/tests/testdata/TestContextSubChat/call8.golden +++ b/pkg/tests/testdata/TestContextSubChat/call8.golden @@ -9,8 +9,8 @@ "description": "Concludes the conversation. This can not be used to ask a question.", "parameters": { "properties": { - "summary": { - "description": "A summary of the dialog", + "return": { + "description": "The instructed value to return or a summary of the dialog if no value is instructed", "type": "string" } }, diff --git a/pkg/tests/testdata/TestContextSubChat/step1.golden b/pkg/tests/testdata/TestContextSubChat/step1.golden index 39c65251..53ef8e7b 100644 --- a/pkg/tests/testdata/TestContextSubChat/step1.golden +++ b/pkg/tests/testdata/TestContextSubChat/step1.golden @@ -86,8 +86,8 @@ "description": "Concludes the conversation. This can not be used to ask a question.", "parameters": { "properties": { - "summary": { - "description": "A summary of the dialog", + "return": { + "description": "The instructed value to return or a summary of the dialog if no value is instructed", "type": "string" } }, diff --git a/pkg/tests/testdata/TestContextSubChat/step3.golden b/pkg/tests/testdata/TestContextSubChat/step3.golden index 2c900ace..e8fbfcfb 100644 --- a/pkg/tests/testdata/TestContextSubChat/step3.golden +++ b/pkg/tests/testdata/TestContextSubChat/step3.golden @@ -130,8 +130,8 @@ "description": "Concludes the conversation. This can not be used to ask a question.", "parameters": { "properties": { - "summary": { - "description": "A summary of the dialog", + "return": { + "description": "The instructed value to return or a summary of the dialog if no value is instructed", "type": "string" } }, diff --git a/pkg/tests/testdata/TestDualSubChat/call2.golden b/pkg/tests/testdata/TestDualSubChat/call2.golden index 18ef5c00..2d29bfc8 100644 --- a/pkg/tests/testdata/TestDualSubChat/call2.golden +++ b/pkg/tests/testdata/TestDualSubChat/call2.golden @@ -9,8 +9,8 @@ "description": "Concludes the conversation. This can not be used to ask a question.", "parameters": { "properties": { - "summary": { - "description": "A summary of the dialog", + "return": { + "description": "The instructed value to return or a summary of the dialog if no value is instructed", "type": "string" } }, diff --git a/pkg/tests/testdata/TestDualSubChat/call3.golden b/pkg/tests/testdata/TestDualSubChat/call3.golden index 2359072b..415c8332 100644 --- a/pkg/tests/testdata/TestDualSubChat/call3.golden +++ b/pkg/tests/testdata/TestDualSubChat/call3.golden @@ -9,8 +9,8 @@ "description": "Concludes the conversation. This can not be used to ask a question.", "parameters": { "properties": { - "summary": { - "description": "A summary of the dialog", + "return": { + "description": "The instructed value to return or a summary of the dialog if no value is instructed", "type": "string" } }, diff --git a/pkg/tests/testdata/TestDualSubChat/call4.golden b/pkg/tests/testdata/TestDualSubChat/call4.golden index 84dfacc9..f1fa4ecf 100644 --- a/pkg/tests/testdata/TestDualSubChat/call4.golden +++ b/pkg/tests/testdata/TestDualSubChat/call4.golden @@ -9,8 +9,8 @@ "description": "Concludes the conversation. This can not be used to ask a question.", "parameters": { "properties": { - "summary": { - "description": "A summary of the dialog", + "return": { + "description": "The instructed value to return or a summary of the dialog if no value is instructed", "type": "string" } }, diff --git a/pkg/tests/testdata/TestDualSubChat/call5.golden b/pkg/tests/testdata/TestDualSubChat/call5.golden index efaffb32..165a064b 100644 --- a/pkg/tests/testdata/TestDualSubChat/call5.golden +++ b/pkg/tests/testdata/TestDualSubChat/call5.golden @@ -9,8 +9,8 @@ "description": "Concludes the conversation. This can not be used to ask a question.", "parameters": { "properties": { - "summary": { - "description": "A summary of the dialog", + "return": { + "description": "The instructed value to return or a summary of the dialog if no value is instructed", "type": "string" } }, diff --git a/pkg/tests/testdata/TestDualSubChat/call6.golden b/pkg/tests/testdata/TestDualSubChat/call6.golden index fbc2db55..69bf9804 100644 --- a/pkg/tests/testdata/TestDualSubChat/call6.golden +++ b/pkg/tests/testdata/TestDualSubChat/call6.golden @@ -9,8 +9,8 @@ "description": "Concludes the conversation. This can not be used to ask a question.", "parameters": { "properties": { - "summary": { - "description": "A summary of the dialog", + "return": { + "description": "The instructed value to return or a summary of the dialog if no value is instructed", "type": "string" } }, diff --git a/pkg/tests/testdata/TestDualSubChat/step1.golden b/pkg/tests/testdata/TestDualSubChat/step1.golden index 6e3075b3..c02e67a9 100644 --- a/pkg/tests/testdata/TestDualSubChat/step1.golden +++ b/pkg/tests/testdata/TestDualSubChat/step1.golden @@ -123,8 +123,8 @@ "description": "Concludes the conversation. This can not be used to ask a question.", "parameters": { "properties": { - "summary": { - "description": "A summary of the dialog", + "return": { + "description": "The instructed value to return or a summary of the dialog if no value is instructed", "type": "string" } }, @@ -189,8 +189,8 @@ "description": "Concludes the conversation. This can not be used to ask a question.", "parameters": { "properties": { - "summary": { - "description": "A summary of the dialog", + "return": { + "description": "The instructed value to return or a summary of the dialog if no value is instructed", "type": "string" } }, diff --git a/pkg/tests/testdata/TestDualSubChat/step2.golden b/pkg/tests/testdata/TestDualSubChat/step2.golden index c21a49c9..0f090762 100644 --- a/pkg/tests/testdata/TestDualSubChat/step2.golden +++ b/pkg/tests/testdata/TestDualSubChat/step2.golden @@ -130,8 +130,8 @@ "description": "Concludes the conversation. This can not be used to ask a question.", "parameters": { "properties": { - "summary": { - "description": "A summary of the dialog", + "return": { + "description": "The instructed value to return or a summary of the dialog if no value is instructed", "type": "string" } }, diff --git a/pkg/tests/testdata/TestDualSubChat/step3.golden b/pkg/tests/testdata/TestDualSubChat/step3.golden index 959d66c2..a35becd7 100644 --- a/pkg/tests/testdata/TestDualSubChat/step3.golden +++ b/pkg/tests/testdata/TestDualSubChat/step3.golden @@ -130,8 +130,8 @@ "description": "Concludes the conversation. This can not be used to ask a question.", "parameters": { "properties": { - "summary": { - "description": "A summary of the dialog", + "return": { + "description": "The instructed value to return or a summary of the dialog if no value is instructed", "type": "string" } },