Skip to content

Commit e2c8daa

Browse files
Merge pull request #322 from ibuildthecloud/main
bug: sys.chat.finish did not return proper message
2 parents 58a6a4b + d01f9f5 commit e2c8daa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/builtin/builtin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ func (e *ErrChatFinish) Error() string {
630630

631631
func SysChatFinish(ctx context.Context, env []string, input string) (string, error) {
632632
var params struct {
633-
Message string `json:"message,omitempty"`
633+
Message string `json:"summary,omitempty"`
634634
}
635635
if err := json.Unmarshal([]byte(input), &params); err != nil {
636636
return "", &ErrChatFinish{

pkg/tests/runner_test.go

Lines changed: 2 additions & 2 deletions
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: `{"message":"Chat done"}`,
67+
Arguments: `{"summary":"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: `{"message":"Chat done2"}`,
92+
Arguments: `{"summary":"Chat done2"}`,
9393
},
9494
}, tester.Result{
9595
Text: "And we're done",

0 commit comments

Comments
 (0)