Skip to content

Commit 7f7498f

Browse files
authored
Use the myself record on the IA chat (#4472)
2 parents d5ca909 + 4c69310 commit 7f7498f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

model/rag/chat.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"net/url"
1212
"time"
1313

14+
"github.com/cozy/cozy-stack/model/contact"
1415
"github.com/cozy/cozy-stack/model/instance"
1516
"github.com/cozy/cozy-stack/model/job"
1617
"github.com/cozy/cozy-stack/pkg/consts"
@@ -126,8 +127,10 @@ func Query(inst *instance.Instance, logger logger.Logger, query QueryMessage) er
126127
if err != nil {
127128
return err
128129
}
130+
myself, _ := contact.GetMyself(inst)
129131
payload := map[string]interface{}{
130132
"messages": chat.Messages,
133+
"myself": myself,
131134
"stream": true,
132135
}
133136

0 commit comments

Comments
 (0)