From 9d0dcf792ac98889ca1ef2b6cbfd8e7b9d845649 Mon Sep 17 00:00:00 2001 From: mudler Date: Tue, 16 Apr 2024 19:27:56 +0200 Subject: [PATCH] fixups --- agent/agent.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/agent/agent.go b/agent/agent.go index 244b10a..f4bee93 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -560,9 +560,12 @@ func (a *Agent) consumeJob(job *Job, role string) { // If we didn't got any message, we can use the response from the action if chosenAction.Definition().Name.Is(action.ReplyActionName) && msg.Content == "" { - a.logger.Info("No output returned from conversation, using the action response as a reply.") + a.logger.Info("No output returned from conversation, using the action response as a reply " + replyResponse.Message) - msg.Content = replyResponse.Message + msg = openai.ChatCompletionMessage{ + Role: "assistant", + Content: replyResponse.Message, + } } a.currentConversation = append(a.currentConversation, msg)