From 4c6931063647f4a05084f7423ff8e60ddc0f9210 Mon Sep 17 00:00:00 2001 From: Bruno Michel Date: Tue, 8 Oct 2024 09:52:07 +0200 Subject: [PATCH] Use the myself record on the IA chat --- model/rag/chat.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/model/rag/chat.go b/model/rag/chat.go index 2475f2071f0..b45ebaed9f2 100644 --- a/model/rag/chat.go +++ b/model/rag/chat.go @@ -11,6 +11,7 @@ import ( "net/url" "time" + "github.com/cozy/cozy-stack/model/contact" "github.com/cozy/cozy-stack/model/instance" "github.com/cozy/cozy-stack/model/job" "github.com/cozy/cozy-stack/pkg/consts" @@ -126,8 +127,10 @@ func Query(inst *instance.Instance, logger logger.Logger, query QueryMessage) er if err != nil { return err } + myself, _ := contact.GetMyself(inst) payload := map[string]interface{}{ "messages": chat.Messages, + "myself": myself, "stream": true, }