feat(multimodal): 视觉分层路由(多模态检测→主/视觉/OCR 工具)+ 语音 STT→TTS 降级链(异步)

This commit is contained in:
Aska committed 2026-09-06 05:12:36 +08:00
1 parent 02aae2bbb4
commit 0a936a3202
19 files changed
+2121

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
// Package multimodal groups the runtime's non-text input/output handling:
// image understanding (vision) and speech (voice).
//
// It follows 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).
//
// 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.
package multimodal