perf: switch to single-stage routing and low-latency defaults
Some checks failed
Pre-commit / run (ubuntu-latest) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_en (ubuntu-latest, 3.10) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_zh (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.12) (push) Has been cancelled
Some checks failed
Pre-commit / run (ubuntu-latest) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_en (ubuntu-latest, 3.10) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_zh (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.12) (push) Has been cancelled
This commit is contained in:
@@ -6,12 +6,11 @@
|
||||
- `OpenAIChatFormatter`
|
||||
- `InMemoryMemory`
|
||||
- `structured_model` 输出
|
||||
- `Orchestrator` 编排(Router + Specialists)
|
||||
- `Orchestrator` 编排(单阶段直达 Specialists)
|
||||
|
||||
## 架构
|
||||
|
||||
- `app/agents.py`
|
||||
- `RouterAgent`
|
||||
- `PreSalesAgent`
|
||||
- `QuoteAgent`
|
||||
- `AfterSalesAgent`
|
||||
@@ -32,11 +31,20 @@
|
||||
- `OPENAI_BASE_URL` 默认 `https://ark.cn-beijing.volces.com/api/v3`
|
||||
- `OPENAI_MODEL_NAME` 默认 `doubao-seed-2-0-pro-260215`
|
||||
- `AUTO_QUOTE_WAIT_SECONDS` 默认 `18`
|
||||
- `MESSAGE_DEBOUNCE_SECONDS` 默认 `6`
|
||||
- `MESSAGE_DEBOUNCE_SECONDS` 默认 `0.2`
|
||||
- `IMAGE_MESSAGE_DEBOUNCE_SECONDS` 默认 `0.4`
|
||||
- `AGENT_MAX_ITERS` 默认 `1`
|
||||
- `DECISION_TIMEOUT_SECONDS` 默认 `8`
|
||||
- `STORE_BACKEND` 默认 `sqlite`,可设 `mysql`
|
||||
- `STORE_SQLITE_PATH` 可选
|
||||
- `MYSQL_HOST/MYSQL_PORT/MYSQL_USER/MYSQL_PASSWORD/MYSQL_DATABASE`
|
||||
|
||||
可直接复制模板:
|
||||
|
||||
```powershell
|
||||
copy .env.example .env
|
||||
```
|
||||
|
||||
## 启动(uv run)
|
||||
|
||||
当前环境建议使用(避免上层工程依赖干扰):
|
||||
@@ -45,6 +53,15 @@
|
||||
uv run --with websockets --with pydantic --with openai --with pymysql python run.py
|
||||
```
|
||||
|
||||
### 生产建议(天网)
|
||||
|
||||
- WebSocket:单实例(防重复回复)
|
||||
- HTTP API:多 worker(提升并发)
|
||||
|
||||
```powershell
|
||||
uv run powershell -File .\scripts\start_tianwang_prod.ps1 -Host 127.0.0.1 -Port 6060 -ApiWorkers 2
|
||||
```
|
||||
|
||||
## Golden 回放
|
||||
|
||||
```powershell
|
||||
|
||||
Reference in New Issue
Block a user