docs(comments): 注释中文化 · internal/runtime/multimodal(21 文件,纯替换)
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled

- 只翻注释/文档字符串,代码零变化:go/scanner 词法流比对 21 文件 token+字面量全等,增删行数 1:1(467/467)
- 刻意保留非散文英文:JSON Schema description、工具 Description() 返回值、adapter prompt、API 路径与命令示例、环境变量名
- 逐行确认代码前缀未变,未触碰其他模块
This commit is contained in:
AskaEth committed 2026-10-04 12:28:16 +08:00
1 parent b9e042d07d
commit b0fbb8bc0d
21 files changed
+467 -467

No files matched your search

+13 -13
View File
@@ -1,17 +1,17 @@
// Package multimodal groups the runtime's non-text input/output handling:
// image understanding (vision) and speech (voice).
// Package multimodal 汇集运行时对非文本输入/输出的处理:
// 图像理解(视觉 vision)与语音(voice)。
//
// It follows DevDocs/design/06-多模态.md:
// 它遵循 DevDocs/design/06-多模态.md:
//
// - The vision subpackage routes image messages through a layered strategy
// (main model first, then a tool-shaped vision/OCR adapter) and registers
// those adapters as sdk.Tool capabilities so the M2 tool loop can invoke
// them without putting the image in the main-model context.
// - The voice subpackage provides asynchronous STT/TTS through a degrading
// provider chain (cloud → local → edge-tts/espeak → silent).
// - vision 子包按分层策略路由图像消息(先主模型,
// 再工具形态的 vision/OCR 适配器),并把
// 这些适配器注册为 sdk.Tool 能力,使 M2 工具循环能调用
// 它们,而无需把图像放进主模型上下文。
// - voice 子包通过一条降级提供方链
// (cloud → local → edge-tts/espeak → silent)提供异步 STT/TTS。
//
// Both subpackages keep real provider calls behind interfaces with an HTTP
// default implementation, so they are testable with a stdlib httptest server
// and leave the real cloud/local providers as adaptation points for later
// milestones.
// 两个子包都把真实的提供方调用藏在接口之后,并提供一个 HTTP
// 默认实现,因此可用标准库 httptest 服务器测试,
// 同时把真实的云端/本地提供方留作后续
// 里程碑的适配点。
package multimodal