From 4f9ec2896b1f42ec4a52cccf67c701a4282785b4 Mon Sep 17 00:00:00 2001 From: mudler Date: Sat, 6 Apr 2024 15:07:48 +0200 Subject: [PATCH] reason should be said from system' ' --- agent/actions.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/agent/actions.go b/agent/actions.go index de69691..0c50127 100644 --- a/agent/actions.go +++ b/agent/actions.go @@ -205,10 +205,12 @@ func (a *Agent) pickAction(ctx context.Context, templ string, messages []openai. actionsID = append(actionsID, m.Definition().Name.String()) } intentionsTools := action.NewIntention(actionsID...) + + //XXX: Why we add the reason here? params, err := a.decision(ctx, append(c, openai.ChatCompletionMessage{ - Role: "assistent", - Content: reason, + Role: "system", + Content: "The assistant thought: " + reason, }), Actions{intentionsTools}.ToTools(), intentionsTools.Definition().Name)