Skip to content

Commit d814eb3

Browse files
doc update
1 parent f1613a3 commit d814eb3

3 files changed

Lines changed: 12 additions & 14 deletions

File tree

docs/API_DOCS.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -623,24 +623,15 @@ Return persisted messages for one conversation owned by the authenticated user.
623623
{
624624
"id": "message-uuid-1",
625625
"conversation_id": "conversation-uuid-123",
626-
"role": "user",
627-
"content": "What are the key terms in our contracts?",
628-
"created_at": "27:06:2026 10:15:00.123"
629-
},
630-
{
631-
"id": "message-uuid-2",
632-
"conversation_id": "conversation-uuid-123",
633-
"role": "assistant",
634-
"content": "Based on the analyzed contracts, the key terms include...",
626+
"query": "What are the key terms in our contracts?",
627+
"response": "Based on the analyzed contracts, the key terms include...",
635628
"created_at": "27:06:2026 10:15:02.512"
636629
}
637630
]
638631
```
639632

640633
**Errors:**
641634
- `404 Not Found` — conversation does not exist or does not belong to the authenticated user
642-
643-
**Errors:**
644635
- `502 Bad Gateway` — agent orchestration failed (LLM/tool failure surfaced as `AgentError`)
645636
- `500 Internal Server Error` — unexpected unhandled server error
646637

docs/ARCHITECTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ POST /v1/chat/invoke { "query": "...", "conversation_id": optional }
136136
137137
→ loop back to Agent node until no more tool calls
138138
139-
→ persist USER and ASSISTANT turns in chat_messages
139+
→ persist one Q/A turn row in chat_messages (user_query + assistant_response)
140140
→ update chat_conversations.updated_at
141141
→ return { response: "...", conversation_id: "..." }
142142

docs/CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,20 @@ Project history up to 2026-06-27.
2424
- Creates a new conversation when `conversation_id` is absent.
2525
- Validates user/company ownership when `conversation_id` is provided.
2626
- Loads prior turns into graph input context.
27-
- Persists both user and assistant turns for every invoke.
27+
- Persists one row per chat turn in `chat_messages` (`user_query` + `assistant_response`).
2828
- Startup schema verification now requires chat history tables.
2929

3030
### Database
3131

3232
- Added migration `0005_add_chat_history_tables.py`.
33-
- Applied migration path now includes `0001 -> 0005`.
33+
- Added migration `0006_chat_messages_single_turn_rows.py`.
34+
- Added migration `0007_remove_legacy_chat_message_columns.py`.
35+
- Applied migration path now includes `0001 -> 0007`.
36+
37+
### Removed
38+
39+
- Legacy chat columns `chat_messages.role` and `chat_messages.content`.
40+
- Legacy enum type `chatmessagerole`.
3441

3542
### Testing
3643

0 commit comments

Comments
 (0)