Add LLM token
This commit is contained in:
+30
-4
@@ -390,12 +390,38 @@ Demo-glm/
|
||||
| 下载文档 | `/api/v1/documents/download/{doc_id}` | GET | 下载原文PDF/DOCX |
|
||||
| 文档列表 | `/api/v1/documents/list` | GET | 列出已上传文档 |
|
||||
| 检索知识 | `/api/v1/knowledge/search` | POST | 向量检索 |
|
||||
| 单次问答 | `/api/v1/agent/ask` | POST | 智能问答 |
|
||||
| 多轮对话 | `/api/v1/agent/chat` | POST | 会话对话 |
|
||||
| 单次问答 | `/api/v1/agent/ask` | POST | 标准单轮问答 |
|
||||
| 多轮对话 | `/api/v1/agent/chat` | POST | 标准会话对话 |
|
||||
| 流式对话 | `/api/v1/agent/chat/stream` | POST | 标准流式问答 (SSE) |
|
||||
| **Agentic 流式对话** | **`/api/v1/agent/agentic/stream`** | **POST** | **P0-1 多步推理 (SSE):意图分析→查询分解→迭代检索→引文锚定→生成** |
|
||||
| 会话信息 | `/api/v1/agent/session/{id}` | GET | 获取会话 |
|
||||
| 删除会话 | `/api/v1/agent/session/{id}` | DELETE | 删除会话 |
|
||||
| Prompt模板 | `/api/v1/agent/templates` | GET | 模板列表 |
|
||||
| 可用模型 | `/api/v1/agent/models` | GET | LLM模型列表 |
|
||||
| 会话历史 | `/api/v1/agent/session/{id}/history` | GET | 获取历史记录 |
|
||||
| 会话列表 | `/api/v1/agent/sessions` | GET | 列出所有会话 |
|
||||
|
||||
### Agentic 流式接口说明 (`/api/v1/agent/agentic/stream`)
|
||||
|
||||
**请求体** (同 `/agent/chat/stream`):
|
||||
```json
|
||||
{ "query": "GB 18384 与 ECE R100 在电池安全上有哪些差异?", "session_id": null, "top_k": 5 }
|
||||
```
|
||||
|
||||
**额外 SSE 事件** (`thinking`):
|
||||
```
|
||||
event: thinking
|
||||
data: {"step": "intent_analysis", "status": "done", "intent_type": "compare", "requires_decomposition": true}
|
||||
|
||||
event: thinking
|
||||
data: {"step": "query_planning", "status": "done", "sub_queries": ["GB 18384 电池安全要求", "ECE R100 电池安全要求"]}
|
||||
|
||||
event: thinking
|
||||
data: {"step": "retrieving", "status": "done", "query": "GB 18384 电池安全要求", "index": 1, "total": 2, "found": 8}
|
||||
|
||||
event: thinking
|
||||
data: {"step": "grounding_check", "status": "done", "sufficient": true, "confidence": 0.82, "reason": "检索置信度充足"}
|
||||
```
|
||||
|
||||
**意图类型**:`simple_qa`(单跳)/ `compare`(对比)/ `multi_hop`(多跳)/ `ambiguous`(模糊)
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user