Files
Cyrene_v2/internal/runtime/multimodal/vision/errors.go
T

23 lines
1.1 KiB
Go

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")
)