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)