diff --git a/docs/ai.md b/docs/ai.md index f323dcedcdb..d3a13c6fe40 100644 --- a/docs/ai.md +++ b/docs/ai.md @@ -75,7 +75,7 @@ Content-Type: application/vnd.api+json ```json { "data": { - "type": "io.cozy.ai.chat.conversations" + "type": "io.cozy.ai.chat.conversations", "id": "e21dce8058b9013d800a18c04daba326", "rev": "1-23456", "attributes": { @@ -83,10 +83,18 @@ Content-Type: application/vnd.api+json { "id": "eb17c3205bf1013ddea018c04daba326", "role": "user", - "content": "Why the sky is blue?" + "content": "Why the sky is blue?", + "createdAt": "2024-09-24T13:24:07.576Z" } ] } + }, + "cozyMetadata": { + "createdAt": "2024-09-24T13:24:07.576Z", + "createdOn": "http://cozy.localhost:8080/", + "doctypeVersion": "1", + "metadataVersion": 1, + "updatedAt": "2024-09-24T13:24:07.576Z" } } ``` diff --git a/model/rag/chat.go b/model/rag/chat.go index 3a053627ac0..ff4ff39b7f5 100644 --- a/model/rag/chat.go +++ b/model/rag/chat.go @@ -36,10 +36,10 @@ type ChatConversation struct { } type ChatMessage struct { - ID string `json:"id"` - Role string `json:"role"` - Content string `json:"content"` - CreatedAt time.Time + ID string `json:"id"` + Role string `json:"role"` + Content string `json:"content"` + CreatedAt time.Time `json:"createdAt"` } const (