Skip to content

Ollama vision support #22734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 11, 2024

Conversation

stepdi
Copy link
Contributor

@stepdi stepdi commented Jun 10, 2024

Description: Ollama vision with messages in OpenAI-style support { "image_url": { "url": ... } }
Issue: #22460

Added flexible solution for ChatOllama to support chat messages with images. Works when you provide either image_url as a string or as a dict with "url" inside (like OpenAI does). So it makes available to use tuples with ChatPromptTemplate.from_messages()

Added flexible solution for ChatOllama to support chat messages with images. Works when you provide either image_url as a string  or as a dict with "url" inside (like OpenAI does). 
So it makes available to use tuples with ChatPromptTemplate.from_messages
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 10, 2024
Copy link

vercel bot commented Jun 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Jun 11, 2024 4:03pm

@dosubot dosubot bot added the 🤖:improvement Medium size change to existing code to handle new use-cases label Jun 10, 2024
@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Jun 10, 2024
@ccurme ccurme enabled auto-merge (squash) June 11, 2024 14:18
@ccurme ccurme merged commit 912751e into langchain-ai:master Jun 11, 2024
42 checks passed
hinthornw pushed a commit that referenced this pull request Jun 20, 2024
**Description:** Ollama vision with messages in OpenAI-style support `{
"image_url": { "url": ... } }`
**Issue:** #22460 

Added flexible solution for ChatOllama to support chat messages with
images. Works when you provide either `image_url` as a string or as a
dict with "url" inside (like OpenAI does). So it makes available to use
tuples with `ChatPromptTemplate.from_messages()`

---------

Co-authored-by: Bagatur <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:improvement Medium size change to existing code to handle new use-cases lgtm PR looks good. Use to confirm that a PR is ready for merging. size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants