feat(asr): 本地语音转写接入为一级路由 + 并行工作流合并提交
按用户指示做**一包提交**,不按工作流拆分。本提交刻意混合了多条并行线:
· 本地 ASR 接管:audio 成为与 chat/embed/image/video 同等的路由类别
(IsLocalRoute 单一判据、audio 健康探测、default_audio_route、
auto 占位、GET /api/ai/routes/audio、回退云端时界面明示「音频已出网」)
· LLM 调用层:ctx 贯穿、ToolCall/ToolSchema、EmptyCompletionError /
TransientUpstreamError(按错误类型而非文案判重试)
· 编排 Agent:general_assistant orchestrate/persistence/spec_driver
· 联网搜索:internal/search(playwright)
· 网盘:backend + 前端
· 前端 UI:导航/路由/工作台若干页
· 交付文档:DELIVERY.md / AR04 / 部署文档的「无 Python」表述据实改写,
新增 eai_agentplatform-asr.service、asr.env、clonezilla-cleanup 清 ~/asr-poc
不分拆的原因:dev 早期,粒度不该打断工作节奏。且实测过——这些改动
**在编译上是同一个单元**(llm.go 的 ctx 签名变更牵动 12 个调用点,
chat_message.go 的 ctx 改动又与编排重写同处一个 hunk),拆出来的中间态编不过。
详见 TOP_CODING_RULES.md G14.5 与 bugs_and_errors.md E09。
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
services:
|
||||
# 使用 host 网络:容器与宿主机共享网络栈。
|
||||
# 原因:本机环境 Docker bridge 模式的 NAT 出站被阻断,容器无法访问外网;
|
||||
# host 模式下 searxng 直接复用宿主网络可正常联网(已验证 python host-net 连 baidu:443 OK)。
|
||||
searxng-valkey:
|
||||
image: ${SEARXNG_VALKEY_IMAGE:-ghcr.io/valkey-io/valkey:8.1.4}
|
||||
container_name: eai-searxng-valkey
|
||||
command: ["valkey-server", "--save", "", "--appendonly", "no"]
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
volumes:
|
||||
- searxng-valkey-data:/data
|
||||
|
||||
searxng:
|
||||
image: ${SEARXNG_IMAGE:-ghcr.io/searxng/searxng:latest}
|
||||
container_name: eai-searxng
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
environment:
|
||||
SEARXNG_BASE_URL: ${SEARXNG_PUBLIC_BASE_URL:-http://127.0.0.1:18080/}
|
||||
SEARXNG_SECRET: ${SEARXNG_SECRET:-eai-agentplatform-searxng-change-me}
|
||||
SEARXNG_VALKEY_URL: valkey://127.0.0.1:6379/0
|
||||
SEARXNG_PORT: ${SEARXNG_PORT:-18080}
|
||||
UWSGI_THREADS: 4
|
||||
volumes:
|
||||
- ./searxng:/etc/searxng:ro
|
||||
- searxng-cache:/var/cache/searxng
|
||||
depends_on:
|
||||
- searxng-valkey
|
||||
|
||||
volumes:
|
||||
searxng-cache:
|
||||
searxng-valkey-data:
|
||||
@@ -0,0 +1,47 @@
|
||||
# SearXNG settings for pj0235 eai_agentplatform
|
||||
use_default_settings:
|
||||
engines:
|
||||
keep_only:
|
||||
- baidu
|
||||
- 360search
|
||||
- sogou
|
||||
- bing
|
||||
- wikipedia
|
||||
- bilibili
|
||||
|
||||
general:
|
||||
debug: false
|
||||
instance_name: "pj0235 SearXNG"
|
||||
|
||||
search:
|
||||
safe_search: 0
|
||||
autocomplete: ""
|
||||
formats:
|
||||
- html
|
||||
- json
|
||||
|
||||
server:
|
||||
secret_key: "eai-agentplatform-searxng-change-me"
|
||||
limiter: false
|
||||
image_proxy: true
|
||||
|
||||
valkey:
|
||||
url: valkey://127.0.0.1:6379/0
|
||||
|
||||
engines:
|
||||
- name: baidu
|
||||
disabled: false
|
||||
timeout: 5.0
|
||||
- name: 360search
|
||||
disabled: false
|
||||
timeout: 5.0
|
||||
- name: sogou
|
||||
disabled: false
|
||||
timeout: 6.0
|
||||
- name: bing
|
||||
disabled: false
|
||||
timeout: 5.0
|
||||
- name: wikipedia
|
||||
disabled: false
|
||||
- name: bilibili
|
||||
disabled: false
|
||||
Reference in New Issue
Block a user