Skip to content
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

ollama[patch]: support ollama 0.4 #28364

Merged
merged 1 commit into from
Nov 26, 2024
Merged

ollama[patch]: support ollama 0.4 #28364

merged 1 commit into from
Nov 26, 2024

Conversation

ccurme
Copy link
Collaborator

@ccurme ccurme commented Nov 26, 2024

v0.4 of the Python SDK is already installed via the lock file in CI, but our current implementation is not compatible with it.

This also addresses an issue introduced in #28299. @RyanMagnuson would you mind explaining the motivation for that change? From what I can tell the Ollama SDK does not support kwargs. Previously, unsupported kwargs were ignored, but they currently raise TypeError.

Some of LangChain's standard test suite expects tool_choice to be supported, so here we catch it in bind_tools so it is ignored and not passed through to the client.

Copy link

vercel bot commented Nov 26, 2024

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

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Nov 26, 2024 5:43pm

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Nov 26, 2024
@ccurme ccurme merged commit 74d9d2c into master Nov 26, 2024
20 checks passed
@ccurme ccurme deleted the cc/fix_ollama branch November 26, 2024 17:46
AlwaysBluer pushed a commit to AlwaysBluer/langchain that referenced this pull request Nov 27, 2024
… into LindormIntegration

* 'LindormIntegration' of github.com:AlwaysBluer/langchain: (72 commits)
  langchain[patch]: update deprecation message for agent classes and constructors (langchain-ai#28369)
  Updated docs for the BM25 preprocessing function (langchain-ai#28101)
  Community: Marqo Index Setting GET Request Updated according to `2.x` API version while keep backward compatability for 1.5.x (langchain-ai#28342)
  langchain: Fix Neo4jVector vector store reference from partner package for self query (langchain-ai#28292)
  ollama[patch]: bump to 0.4.1 in lock file (langchain-ai#28365)
  ollama[patch]: support ollama 0.4 (langchain-ai#28364)
  openai[patch]: bump core dep (langchain-ai#28361)
  openai[patch]: Release 0.2.10 (langchain-ai#28360)
  openai[patch]: use max_completion_tokens in place of max_tokens (langchain-ai#26917)
  langchain[patch]: support numpy 2 (langchain-ai#28183)
  docs: update tutorials (langchain-ai#28219)
  docs[patch]: fix broken anchor link (langchain-ai#28358)
  docs(create_sql_agent): fix reStructured Text Markup (langchain-ai#28356)
  Community: Adding citations in AIMessage for ChatPerplexity (langchain-ai#28321)
  docs: update azure_openai_whisper_parser.ipynb (langchain-ai#28327)
  community[patch]: fix import in test (langchain-ai#28339)
  community[patch]: Neo4j community deprecation (langchain-ai#28130)
  community: fixed critical bugs at Writer provider (langchain-ai#27879)
  docs: fix GOOGLE_API_KEY typo (langchain-ai#28322)
  community[patch]: release 0.3.8 (langchain-ai#28316)
  ...
@RyanMagnuson
Copy link

@ccurme For sure. I encountered some weird behavior while trying to work with multimodal input to an Ollama model following this tutorial. I then switched to using chatollama, and encountered an error in the serialization of the model. At this point I was in contact with @efriis, who I believe worked with the ollama folks to debug and make the change in #28299.

ollama version: 0.4.3
langchain-ollama:0.2.0

Initial behavior following tutorial:
image

Error serializing model:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants