17 Mar, 2026
2 commits
-
多个独立翻译能力”重构。现在业务侧不再把翻译当 provider 选型,QueryParser 和 indexer 统一通过 6006 的 translator service client 调用;真正的能力选择、启用开关、model + scene 路由,都收口到服务端和新的 translation/ 目录里了。 这次的核心改动在 config/services_config.py、providers/translation.py、api/translator_app.py、config/config.yaml 和新的 translation/service.py。配置从旧的 services.translation.provider/providers 改成了 service_url + default_model + default_scene + capabilities,每个能力可独立 enabled;服务端新增了统一的 backend 管理与懒加载,真实实现集中到 translation/backends/qwen_mt.py、translation/backends/llm.py、translation/backends/deepl.py,旧的 query/qwen_mt_translate.py、query/llm_translate.py、query/deepl_provider.py 只保留兼容导出。接口上,/translate 现在标准支持 scene,context 作为兼容别名继续可用,健康检查会返回默认模型、默认场景和已启用能力。
-
- Rename indexer/product_annotator.py to indexer/product_enrich.py and remove CSV-based CLI entrypoint, keeping only in-memory analyze_products API - Introduce dedicated product_enrich logging with separate verbose log file for full LLM requests/responses - Change indexer and /indexer/enrich-content API wiring to use indexer.product_enrich instead of indexer.product_annotator, updating tests and docs accordingly - Switch translate_prompts to share SUPPORTED_INDEX_LANGUAGES from tenant_config_loader and reuse that mapping for language code → display name - Remove hard SUPPORTED_LANGS constraint from LLM content-enrichment flow, driving languages directly from tenant/indexer configuration - Redesign LLM prompt generation to support multi-round, multi-language tables: first round in English, subsequent rounds translate the entire table (headers + cells) into target languages using English instructions
13 Mar, 2026
2 commits
10 Mar, 2026
2 commits
-
1. 新增 `scripts/init_env.sh` - 若 `.env` 不存在,从 `.env.example` 复制生成 - 支持 `--force`:覆盖 `.env` 并备份为 `.env.bak` - 首次搭建时统一执行:`./scripts/init_env.sh` 2. 统一加载逻辑 `scripts/lib/load_env.sh` - 移除 `activate.sh` 和 `service_ctl.sh` 中的重复解析逻辑 - 使用共享的 `load_env_file`,并改为 `eval "$(printf 'export %s=%q\n' "$key" "$value")"` 安全导出 - 支持含 ``、`$`、空格等特殊字符的值(需在 `.env` 中用引号包裹) 3. 使用方式 - **activate.sh**:`source scripts/lib/load_env.sh` 后调用 `load_env_file` - **service_ctl.sh**:同上,去掉内联的 `load_env_file` 实现 - **create_tenant_index.sh**:改为使用共享 loader,不再用 `set -a; source .env` 4. 文档更新 - **README.md**:在快速开始中加入 `./scripts/init_env.sh` - **docs/QUICKSTART.md**:说明 `init_env.sh` 用法,并强调含特殊字符的密码需加引号 - **.env.example**:补充注释说明引号规则 5. setup.sh - 用 `./scripts/init_env.sh` 替代原先的 `cp .env.example .env` --- **推荐流程**: ```bash ./scripts/create_venv.sh ./scripts/init_env.sh 从 .env.example 生成本地 .env source activate.sh ./run.sh ``` **密码写法**:若密码包含 ``、`$`、`&`、空格等,需加引号,例如: ```env DB_PASSWORD="qY8tgodLoA&KTyQ" ES_PASSWORD="4hOaLaf41y2VuI8y" ```
26 Jan, 2026
1 commit
-
文档: 翻译模块说明.md
31 Dec, 2025
1 commit