Skip to content

Send images per message in Ollama chat requests - #183

Open
james-333i wants to merge 1 commit into
huggingface:mainfrom
james-333i:fix/167-ollama-vision-images
Open

Send images per message in Ollama chat requests#183
james-333i wants to merge 1 commit into
huggingface:mainfrom
james-333i:fix/167-ollama-vision-images

Conversation

@james-333i

Copy link
Copy Markdown

OllamaLanguageModel attached base64 images at the top level of the /api/chat request body, but the endpoint only reads images from the messages themselves, so image input was silently dropped and vision models responded as if no image was provided.

Move images onto OllamaMessage and drop the unused top-level field. Adds request-encoding tests that run without a live Ollama server.

Fixes #167

OllamaLanguageModel attached base64 images at the top level of the
/api/chat request body, but the endpoint only reads images from the
messages themselves, so image input was silently dropped and vision
models responded as if no image was provided.

Move images onto OllamaMessage and drop the unused top-level field.
Adds request-encoding tests that run without a live Ollama server.

Fixes huggingface#167
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OllamaLanguageModel: vision images sent at request top level, ignored by /api/chat

2 participants