initial_commit
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
# API リファレンス
|
||||
|
||||
ベースURL: `http://localhost:8000`
|
||||
Swagger UI: `http://localhost:8000/docs`
|
||||
|
||||
## チャット
|
||||
|
||||
### POST /chat/stream
|
||||
SSE でストリーミング応答を返す。
|
||||
|
||||
**リクエストボディ**
|
||||
```json
|
||||
{
|
||||
"message": "こんにちは",
|
||||
"session_id": "uuid (省略時は新規セッション作成)",
|
||||
"model": "gpt-4o (省略時は DEFAULT_MODEL)"
|
||||
}
|
||||
```
|
||||
|
||||
**SSEイベント**
|
||||
```
|
||||
data: {"type":"session_id","value":"<uuid>"} // 新規セッション時のみ
|
||||
data: {"type":"chunk","value":"テキスト断片"}
|
||||
data: {"type":"done"}
|
||||
```
|
||||
|
||||
### GET /chat/sessions
|
||||
セッション一覧を `updated_at` 降順で返す。
|
||||
|
||||
### DELETE /chat/sessions/{session_id}
|
||||
セッションと紐づくメッセージ・メモリをすべて削除。
|
||||
|
||||
## メモリ
|
||||
|
||||
### GET /memory/{session_id}
|
||||
セッションの長期メモリ(要約)一覧を返す。
|
||||
|
||||
### DELETE /memory/{memory_id}
|
||||
特定のメモリエントリを削除。
|
||||
Reference in New Issue
Block a user