ollama.chat() should accept images for vision model support #268

Closed
opened 2026-02-15 16:29:24 -05:00 by yindo · 0 comments
Owner

Originally created by @Syntax-Read3r on GitHub (May 13, 2025).

Summary

The current ollama Python package does not support the images parameter when calling ollama.chat(). This is required for working with vision-enabled models such as llama3.2-vision and llava.

This limitation forces developers to bypass the client and use raw HTTP requests to http://localhost:11434/api/chat, which is less ergonomic and breaks the abstraction the package aims to provide.


Steps to Reproduce

import ollama

response = ollama.chat(
    model="llama3.2-vision",
    messages=[{"role": "user", "content": "Describe this image."}],
    images=["<base64 string>"]
)

TypeError: chat() got an unexpected keyword argument 'images'
Originally created by @Syntax-Read3r on GitHub (May 13, 2025). Summary The current `ollama` Python package does not support the `images` parameter when calling `ollama.chat()`. This is required for working with vision-enabled models such as `llama3.2-vision` and `llava`. This limitation forces developers to bypass the client and use raw HTTP requests to `http://localhost:11434/api/chat`, which is less ergonomic and breaks the abstraction the package aims to provide. --- Steps to Reproduce ```python import ollama response = ollama.chat( model="llama3.2-vision", messages=[{"role": "user", "content": "Describe this image."}], images=["<base64 string>"] ) TypeError: chat() got an unexpected keyword argument 'images'
yindo closed this issue 2026-02-15 16:29:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#268