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

@@ -0,0 +1,22 @@
package vision
import "errors"
// Sentinel errors returned by the vision package. Each is wrapped with %w on
// the way out so callers can test for a category while keeping the cause.
var (
// ErrNoImage is returned when an image source string is empty.
ErrNoImage = errors.New("vision: empty image source")
// ErrNotConfigured is returned by adapters when no endpoint/model is set.
ErrNotConfigured = errors.New("vision: adapter not configured")
// ErrUnsupportedSource is returned when an image source cannot be handled.
ErrUnsupportedSource = errors.New("vision: unsupported image source")
// ErrFetch is returned when a URL image cannot be downloaded.
ErrFetch = errors.New("vision: cannot fetch image")
// ErrUpstream is returned when the vision/OCR provider request fails.
ErrUpstream = errors.New("vision: upstream request failed")
// ErrBadImage is returned when an image cannot be read or decoded.
ErrBadImage = errors.New("vision: cannot read image")
// ErrBadArgs is returned by a tool when its arguments are malformed.
ErrBadArgs = errors.New("vision: bad tool arguments")
)