Skip to content

v0.5.0

Choose a tag to compare

@lennartpollvogt lennartpollvogt released this 27 Oct 15:17
· 8 commits to main since this release

What changed?

  • Separated the OllamaInstructorBaseClient from ollama_instructor_client.py into base_client.py
  • Separated the functionality of methods like handel_response of OllamaInstructorBaseClient into easier maintainable methods
  • Switched from icecream to pythons logging module for debugging. Deleted dependency for icecream.
  • Added the arguments keep_alive and options to chat_completion and chat_completion_with_stream (no more **kwargs)
  • Added support for ollama-python Message and Options classes for code completion within IDE/Editor
  • Added example for multiple asynchronous operations (see here )
  • new version v0.5.0

Details on switch from icecream to logging

As announced in the previous README.md I was planning to switch from the icecream module to pythons built-in logging module. When setting debug = True in the classes OllamaInstructorClient and OllamaInstructorAsyncClient you will now see something like the following:

2024-10-19 16:02:47,851 - ollama_instructor.base_client - DEBUG - ollama_instructor_client.py:369 - Reset state
2024-10-19 16:02:47,851 - ollama_instructor.base_client - DEBUG - ollama_instructor_client.py:371 - Create prompt
2024-10-19 16:02:47,852 - ollama_instructor.base_client - DEBUG - ollama_instructor_client.py:374 - Start while loop
2024-10-19 16:02:47,852 - ollama_instructor.base_client - DEBUG - ollama_instructor_client.py:379 - Prepare message and set left retries
2024-10-19 16:02:47,852 - ollama_instructor.base_client - DEBUG - ollama_instructor_client.py:381 - Request ollama client
...

Details on code completion for messages and options arguments

Code completion support for messages:
image

Code completion support for options:
image

Full Changelog: v0.4.2...v0.5.0