fix: consistently track user message in connector

Signed-off-by: mudler <mudler@localai.io>
This commit is contained in:
mudler
2025-03-26 17:11:09 +01:00
parent 9d6b81d9c2
commit dd6739cbbf
3 changed files with 24 additions and 6 deletions

View File

@@ -122,6 +122,12 @@ func (i *IRC) Start(a *agent.Agent) {
},
)
// Update the conversation history
i.conversationTracker.AddMessage(channel, openai.ChatCompletionMessage{
Content: cleanedMessage,
Role: "user",
})
res := a.Ask(
types.WithConversationHistory(conv),
)