Documentation
¶
Overview ¶
Package vision describes images via a secondary multimodal model. It exists so a non-vision main model can still work with screenshots and pasted images: the loop routes image blocks here, gets text back, and injects that text.
Two wire shapes are supported: an OpenAI-compatible /chat/completions endpoint (works with omlx / LM Studio / vLLM / hosted qwen-VL) and ollama /api/generate.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client points at a multimodal model. API selects the wire shape: "openai" (default) or "ollama". APIKey is optional (local servers skip auth).
func (Client) Describe ¶
func (c Client) Describe(ctx context.Context, img []byte, mediaType, question string) (string, error)
Describe sends one image and returns the model's text description. mediaType is e.g. "image/png"; it defaults to image/png when empty. question overrides the default prompt.