Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
nono committed Sep 24, 2024
1 parent 3f0bedd commit 97919af
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
12 changes: 10 additions & 2 deletions docs/ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,26 @@ 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": {
"messages": [
{
"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"
}
}
```
Expand Down
8 changes: 4 additions & 4 deletions model/rag/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 97919af

Please sign in to comment.