agent 模式补充文件功能已经实现

This commit is contained in:
wandering
2026-06-15 10:39:01 +08:00
parent e252896de9
commit 7c137c5214
34 changed files with 1664 additions and 1651 deletions

View File

@@ -30,7 +30,12 @@ last_reviewed: 2026-06-13
| **17** | **POST** | **`/api/agent/user-supplement/<session_id>`** | **通过文字补充信息** |
| **18** | **POST** | **`/api/agent/force-submit/<session_id>`** | **强制提交,跳过校验** |
> 加粗条目为 Agent 多轮校验流程新增接口。推荐使用 `/api/agent/process` 作为主入口,它会在发票提取后自动进行 LLM 校验,校验通过则自动提交到财务系统。
> 加粗条目为 Agent 多轮校验流程新增接口。
### 入口选择建议
- **推荐使用** `/api/agent/process`完整流程包含发票提取、LLM 信息校验、自动提交财务系统。
- **仅发票提取** `/api/process`:跳过 Agent 校验,只做文档解析和发票分类。适合调试发票提取本身,或仅需导出 CSV 的场景。
---
@@ -710,7 +715,7 @@ POST /api/agent/force-submit/<session_id>
| 事件类型 | 数据结构 | 触发条件 |
|---|---|---|
| `llm_stream` | `{type, phase, content?}` | LLM 输出流 |
| `llm_stream` | `{type, phase, text?}` | LLM 输出流 |
`phase` 取值: `start` / `reasoning` / `chunk` / `end` / `error`