mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
Breaking Change for langchain-ollama==0.2.1 on ollama==0.4.3
#181
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ross-harrison-fox on GitHub (Dec 7, 2024).
Receive Validation code when running the bellow snippet with the following package combination:
langchain==0.3.10ollama==0.4.3langchain-ollama==0.2.1Expected Behavior:
Some response
Actual:
See validation error
Additional Details
ollamapackage directlyollama==0.4.2resolves issue@anton-b commented on GitHub (Dec 7, 2024):
Observing the same issue.
ollama/_types.py0.4.3:
0.4.2:
@edmcman commented on GitHub (Dec 7, 2024):
Can we maybe add a test to make sure that future
ollama-pythonreleases don't break langchain before we release them? This is the second issue in a week now.@nadeemcite commented on GitHub (Dec 7, 2024):
The issue stems from a recent update, where the BaseGenerateRequest class only allows 'json' as a valid value for the format field. Previously, an empty string was also permitted, but this support was removed in the latest update. To resolve this, we can modify the _types.py file in the ollama-python package to allow an empty string alongside 'json'. I've also added a PR to address this issue https://github.com/ollama/ollama-python/pull/368.
@ParthSareen commented on GitHub (Dec 7, 2024):
Apologies for the breaking change! Just rolled out the change - thank you for pointing this!
@jmorganca commented on GitHub (Dec 7, 2024):
Sorry this broke all. You can update the
ollamaPython library to fix it:@ross-harrison-fox commented on GitHub (Dec 10, 2024):
Thank you for the quick fix!