Skip to content

Commit ae4f020

Browse files
Merge pull request #333 from ibuildthecloud/seq
chore: change message of finish tool
2 parents d424c8d + 1ce2bc8 commit ae4f020

16 files changed

+34
-34
lines changed

pkg/builtin/builtin.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ var tools = map[string]types.Tool{
114114
Parameters: types.Parameters{
115115
Description: "Concludes the conversation. This can not be used to ask a question.",
116116
Arguments: types.ObjectSchema(
117-
"summary", "A summary of the dialog",
117+
"return", "The instructed value to return or a summary of the dialog if no value is instructed",
118118
),
119119
},
120120
BuiltinFunc: SysChatFinish,
@@ -640,7 +640,7 @@ func (e *ErrChatFinish) Error() string {
640640

641641
func SysChatFinish(ctx context.Context, env []string, input string) (string, error) {
642642
var params struct {
643-
Message string `json:"summary,omitempty"`
643+
Message string `json:"return,omitempty"`
644644
}
645645
if err := json.Unmarshal([]byte(input), &params); err != nil {
646646
return "", &ErrChatFinish{

pkg/tests/runner_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func TestDualSubChat(t *testing.T) {
6464
r.RespondWith(tester.Result{
6565
Func: types.CompletionFunctionCall{
6666
Name: types.ToolNormalizer("sys.chat.finish"),
67-
Arguments: `{"summary":"Chat done"}`,
67+
Arguments: `{"return":"Chat done"}`,
6868
},
6969
})
7070

@@ -89,7 +89,7 @@ func TestDualSubChat(t *testing.T) {
8989
r.RespondWith(tester.Result{
9090
Func: types.CompletionFunctionCall{
9191
Name: types.ToolNormalizer("sys.chat.finish"),
92-
Arguments: `{"summary":"Chat done2"}`,
92+
Arguments: `{"return":"Chat done2"}`,
9393
},
9494
}, tester.Result{
9595
Text: "And we're done",

pkg/tests/testdata/TestContextSubChat/call2.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"description": "Concludes the conversation. This can not be used to ask a question.",
1010
"parameters": {
1111
"properties": {
12-
"summary": {
13-
"description": "A summary of the dialog",
12+
"return": {
13+
"description": "The instructed value to return or a summary of the dialog if no value is instructed",
1414
"type": "string"
1515
}
1616
},

pkg/tests/testdata/TestContextSubChat/call3.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"description": "Concludes the conversation. This can not be used to ask a question.",
1010
"parameters": {
1111
"properties": {
12-
"summary": {
13-
"description": "A summary of the dialog",
12+
"return": {
13+
"description": "The instructed value to return or a summary of the dialog if no value is instructed",
1414
"type": "string"
1515
}
1616
},

pkg/tests/testdata/TestContextSubChat/call7.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"description": "Concludes the conversation. This can not be used to ask a question.",
1010
"parameters": {
1111
"properties": {
12-
"summary": {
13-
"description": "A summary of the dialog",
12+
"return": {
13+
"description": "The instructed value to return or a summary of the dialog if no value is instructed",
1414
"type": "string"
1515
}
1616
},

pkg/tests/testdata/TestContextSubChat/call8.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"description": "Concludes the conversation. This can not be used to ask a question.",
1010
"parameters": {
1111
"properties": {
12-
"summary": {
13-
"description": "A summary of the dialog",
12+
"return": {
13+
"description": "The instructed value to return or a summary of the dialog if no value is instructed",
1414
"type": "string"
1515
}
1616
},

pkg/tests/testdata/TestContextSubChat/step1.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@
8686
"description": "Concludes the conversation. This can not be used to ask a question.",
8787
"parameters": {
8888
"properties": {
89-
"summary": {
90-
"description": "A summary of the dialog",
89+
"return": {
90+
"description": "The instructed value to return or a summary of the dialog if no value is instructed",
9191
"type": "string"
9292
}
9393
},

pkg/tests/testdata/TestContextSubChat/step3.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@
130130
"description": "Concludes the conversation. This can not be used to ask a question.",
131131
"parameters": {
132132
"properties": {
133-
"summary": {
134-
"description": "A summary of the dialog",
133+
"return": {
134+
"description": "The instructed value to return or a summary of the dialog if no value is instructed",
135135
"type": "string"
136136
}
137137
},

pkg/tests/testdata/TestDualSubChat/call2.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"description": "Concludes the conversation. This can not be used to ask a question.",
1010
"parameters": {
1111
"properties": {
12-
"summary": {
13-
"description": "A summary of the dialog",
12+
"return": {
13+
"description": "The instructed value to return or a summary of the dialog if no value is instructed",
1414
"type": "string"
1515
}
1616
},

pkg/tests/testdata/TestDualSubChat/call3.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"description": "Concludes the conversation. This can not be used to ask a question.",
1010
"parameters": {
1111
"properties": {
12-
"summary": {
13-
"description": "A summary of the dialog",
12+
"return": {
13+
"description": "The instructed value to return or a summary of the dialog if no value is instructed",
1414
"type": "string"
1515
}
1616
},

pkg/tests/testdata/TestDualSubChat/call4.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"description": "Concludes the conversation. This can not be used to ask a question.",
1010
"parameters": {
1111
"properties": {
12-
"summary": {
13-
"description": "A summary of the dialog",
12+
"return": {
13+
"description": "The instructed value to return or a summary of the dialog if no value is instructed",
1414
"type": "string"
1515
}
1616
},

pkg/tests/testdata/TestDualSubChat/call5.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"description": "Concludes the conversation. This can not be used to ask a question.",
1010
"parameters": {
1111
"properties": {
12-
"summary": {
13-
"description": "A summary of the dialog",
12+
"return": {
13+
"description": "The instructed value to return or a summary of the dialog if no value is instructed",
1414
"type": "string"
1515
}
1616
},

pkg/tests/testdata/TestDualSubChat/call6.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"description": "Concludes the conversation. This can not be used to ask a question.",
1010
"parameters": {
1111
"properties": {
12-
"summary": {
13-
"description": "A summary of the dialog",
12+
"return": {
13+
"description": "The instructed value to return or a summary of the dialog if no value is instructed",
1414
"type": "string"
1515
}
1616
},

pkg/tests/testdata/TestDualSubChat/step1.golden

+4-4
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@
123123
"description": "Concludes the conversation. This can not be used to ask a question.",
124124
"parameters": {
125125
"properties": {
126-
"summary": {
127-
"description": "A summary of the dialog",
126+
"return": {
127+
"description": "The instructed value to return or a summary of the dialog if no value is instructed",
128128
"type": "string"
129129
}
130130
},
@@ -189,8 +189,8 @@
189189
"description": "Concludes the conversation. This can not be used to ask a question.",
190190
"parameters": {
191191
"properties": {
192-
"summary": {
193-
"description": "A summary of the dialog",
192+
"return": {
193+
"description": "The instructed value to return or a summary of the dialog if no value is instructed",
194194
"type": "string"
195195
}
196196
},

pkg/tests/testdata/TestDualSubChat/step2.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@
130130
"description": "Concludes the conversation. This can not be used to ask a question.",
131131
"parameters": {
132132
"properties": {
133-
"summary": {
134-
"description": "A summary of the dialog",
133+
"return": {
134+
"description": "The instructed value to return or a summary of the dialog if no value is instructed",
135135
"type": "string"
136136
}
137137
},

pkg/tests/testdata/TestDualSubChat/step3.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@
130130
"description": "Concludes the conversation. This can not be used to ask a question.",
131131
"parameters": {
132132
"properties": {
133-
"summary": {
134-
"description": "A summary of the dialog",
133+
"return": {
134+
"description": "The instructed value to return or a summary of the dialog if no value is instructed",
135135
"type": "string"
136136
}
137137
},

0 commit comments

Comments
 (0)