Skip to content

v0.5.1

Choose a tag to compare

@lennartpollvogt lennartpollvogt released this 24 Nov 19:29
· 5 commits to main since this release

Bug fix

This release fixes a bug reported with issue #11

The bug occurred when a retry was executed due to an invalid response from the LLM.
As the Ollama server expects string objects for content in the messages list, the method prepare_messages of BaseOllamaInstructorClient was falsely handing over python objects for the retry.

It's recommended that everyone using version v0.5.0 updates to v0.5.1

Note:

What changed?

  • Due to new version 0.4.1 of ollama I had to bump the pydantic version to ^2.9.0 as this is a dependency of ollama. So I had to refactor the function create_partial_model in cleaner.py
  • Refactored the type hints regarding the messages argument.

Warnings!

  • Unfortunately, with the new versions 0.4.1 of ollama the method chat_completion_with_stream of OllamaInstructorClient is broken. I will try to finde a fix. I marked the method as deprecated. Please use chat_completion instead. Older versions of ollama-instructor with using ollama versions below 0.4.0 should work. I am sorry for the inconvenience!