mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
0f439fe1e1
## Summary - 添加第二批核心功能模块的中文翻译(8 个文件):隐私与安全、第三方集成、吉祥物、模型路由、编码器、语音、定时任务、系统与工具 - 修复批次 A 遗留的 12 处未本地化内部链接(因第二批新增目标 `.zh-CN` 文件,之前保留的英文链接现在可指向中文版) - 修复第二批翻译中的 12 处质量问题:错别字、过直译、中英混杂、指向不存在的 `.zh-CN` 链接 - 修复隐私与安全文档中指向 `local-ai.zh-CN.md` 和 `triggers.zh-CN.md` 等尚未翻译文件的错误链接 - 统一 mascot、integrations 等跨模块链接指向,确保中文读者在 zh-CN 文档间流转 - 所有修改仅涉及 `.md` 文档,无代码变更 ## Problem - OpenHuman 中文用户阅读英文文档存在语言障碍 - 第一批汉化(overview + lightweight features)完成后,核心功能模块(integrations、model-routing、native-tools 等)仍无中文版 - 批次 A 的部分链接因目标文件当时未翻译而保留英文版,随着第二批新增 zh-CN 文件,这些链接已过时 ## Solution - 基于英文原文逐文件翻译,遵循术语统一表(vault→存储库、Agent→智能体、LLM/Token 保留英文等) - 翻译完成后运行审计脚本扫描,修复所有未本地化链接、MD040 代码块标识、术语一致性问题 - 对于目标 `.zh-CN.md` 不存在的链接(如 triggers、subconscious、local-ai、agent-coordination),保持指向英文原文,在 Related 中标记后续批次覆盖计划 ## Submission Checklist - [x] I have read the Codex PR Checklist - [x] I have confirmed Type Check passes (`pnpm typecheck`) (N/A: Markdown docs only) - [x] I have confirmed the app builds locally (`pnpm build`) (N/A: Markdown docs only) - [x] I have added tests for this change (N/A: i18n docs do not affect testable logic) - [x] I have updated documentation (N/A: this PR is documentation-only) - [x] I have confirmed no feature flags are required (N/A: no code changes) - [x] I have confirmed Prettier passes (`pnpm format:check`) (N/A: Markdown docs only) ## Impact - Runtime/platform impact: None - Performance/security/migration/compatibility: None ## Related - Follow-up PR(s)/TODOs: - Batch C: subconscious.zh-CN.md, triggers.zh-CN.md, local-ai.zh-CN.md, agent-coordination.zh-CN.md - Batch C: memory-tools.zh-CN.md, meeting-agents.zh-CN.md, developing/cef.zh-CN.md --- ## AI Authored PR Metadata ### Linear Issue - Key: N/A - URL: N/A ### Commit & Branch - Branch: `docs/i18n-batch-b-core-features` - Commit SHA: see PR commits ### Validation Run - [x] `pnpm --filter openhuman-app format:check` — N/A: no code changed - [x] `pnpm typecheck` — N/A: no code changed - [x] Focused tests: N/A - [x] Rust fmt/check: N/A - [x] Tauri fmt/check: N/A ### Validation Blocked - N/A ### Behavior Changes - Intended behavior change: None - User-visible effect: Chinese users can now read core feature docs in zh-CN ### Parity Contract - Legacy behavior preserved: N/A - Guard/fallback/dispatch parity checks: N/A ### Duplicate / Superseded PR Handling - N/A <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Localization** * Updated Simplified Chinese UI strings for vault operations and MCP server/settings. * **Documentation** * Added extensive Chinese documentation covering integrations, mascot/meeting agents, model routing, native tools (voice, web search/scraper, coder, cron, system/tools), memory tree, obsidian wiki, token compression, platform, privacy/security, and subconscious/agent coordination. * **Chores** * Updated ignore rules to exclude AI assistant progress tracking. * Added documentation maintenance and validation scripts. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/tinyhumansai/openhuman/pull/2450?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: agent:skill-master <skill-master@openclaw> Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
3.0 KiB
3.0 KiB
description, icon
| description | icon |
|---|---|
| 一个订阅,多个模型。任务通过 hint 前缀选择模型: 推理发给强模型,快速路径发给快模型,视觉发给视觉模型。 | route |
自动模型路由
智能体的不同部分需要不同的模型。长推理需要前沿模型。快速的"修这个拼写错误"需要又快又便宜的模型。视觉需要视觉模型。OpenHuman 通过内置路由 provider处理这一切,所以你永远不需要考虑它。
请求如何被路由
任何聊天调用上的 model 参数可以取两种形式:
- 具体模型名。例如
anthropic/claude-sonnet-4。路由到带该精确模型的默认 provider。 - Hint 前缀。例如
hint:reasoning。在路由表中查找 hint 并解析为(provider, model)对。
// src/openhuman/providers/router.rs
fn resolve(&self, model: &str) -> (usize, String) {
if let Some(hint) = model.strip_prefix("hint:") {
if let Some((idx, resolved_model)) = self.routes.get(hint) {
return (*idx, resolved_model.clone());
}
}
(self.default_index, model.to_string())
}
路由器包装了多个预创建的 providers(Anthropic、OpenAI、Google、Groq 等),每次请求选择正确的一个。Hint 可以在运行时重新映射而无需重启 core。
常见 hint
| Hint | 典型目标 | 使用场景 |
|---|---|---|
hint:reasoning |
强推理模型 | 多步规划、数学、重度代码轮次 |
hint:fast |
快速/便宜模型 | UI 助手、自动补全、小型分类调用 |
hint:vision |
有视觉能力的模型 | 截图、图像附件、OCR |
hint:summarize |
擅长压缩的模型 | 记忆树摘要构建器 |
hint:code |
代码调优的模型 | 原生编码器轮次 |
精确映射可配置;默认值提供每个 provider 的合理路由。
一个订阅
路由在单一 OpenHuman 订阅背后发生。你不需要分别为 Anthropic、OpenAI、Google 等持有单独的 API 密钥,后端经纪访问,路由器为每个任务选择正确的一个。这就是 README 中"一个订阅,多个 provider"的承诺,具体化了。
覆盖路由
- 全局。配置 TOML(
src/openhuman/config/schema/types.rs中的Config结构体)可以在启动时提供自定义路由表。 - 每次调用。传递具体模型名(无
hint:前缀),路由器回退到带该精确模型的默认 provider。 - 对于技能。技能可以在其 manifest 中固定一个 hint 或模型。
为什么这不是简单的"模型切换器"
路由不是 UI 下拉菜单。智能体循环本身根据它要做什么发出 hint。你不选择模型;任务选择。这就是"多模型"和"智能路由"的区别。
另见
- 智能 Token 压缩。什么使大型推理调用负担得起。
- 原生工具。不同的工具调用暗示不同的路由。
- 本地 AI(可选)。轻量聊天 hint 可以在设备上运行。