Skip to content

0.37.3

Latest

Choose a tag to compare

@simonw simonw released this 16 Nov 23:57
  • llm logs no longer crashes with AttributeError: 'str' object has no attribute 'get' on SQLite 3.54.1 and later when a tool result logged by an LLM version before 0.32 has an attachment. Thanks, Abel Yagubyan. #1879, #1880
  • An async def tool passed to a synchronous model now works when an event loop is already running, for example in a Jupyter notebook. Previously the tool never ran and the model received an asyncio.run() cannot be called from a running event loop error as the tool result. The tool now runs in a separate thread with its own event loop, see Tool functions can be sync or async. Thanks, WU Leizhi. #1728, #1733
  • OpenAI Chat Completions models no longer crash with a JSONDecodeError when the model returns tool call arguments that are not valid JSON, such as arguments cut off part way through. The tool is not run, and the error is sent back to the model as the tool result so it can try again. Thanks, Usama Iftikhar. #1887
  • Fixed streamed tool calls from OpenAI-compatible endpoints that leave index out of their tool call chunks, including Gemini's OpenAI-compatible endpoint. Previously several tool calls in one response were merged into a single call. Thanks, Alex Castillo González. #1862
  • collection.embed_multi() and llm embed-multi now update items when content moves between existing IDs in the same batch, such as two IDs swapping their content. Previously those items were skipped, leaving the old embeddings and stored content in place. Thanks, Steven Huang. #1867
  • llm chat no longer fails to start on Windows with an error about an invalid \e[d key binding. Thanks, Dhvani Mistry. #585, #1809
  • A template or model option with an invalid value inside a list, such as attachments: [123] in a template, now shows the validation error instead of a TypeError traceback. This also stopped llm templates list from working while such a template was present. Thanks, Steven Huang. #1861
  • llm templates edit now shows an error message instead of a traceback when the edited template is not valid. Thanks, Fahmid Arman. #1852
  • llm embed-models default --remove-default no longer fails with a TypeError when no default embedding model has been set. Thanks, Zhengyu Chen. #1870
  • llm embed, llm embed-multi and llm similar now show Unknown embedding model: name when given an embedding model that is not installed, including a default model or a collection's model that has since been uninstalled. Previously they reported that no default model was set, or showed a traceback. Thanks, Abel Yagubyan. #1881, #1882
  • extra-openai-models.yaml is now always read as UTF-8. Previously, on systems with a different default encoding such as Windows, a model alias containing non-ASCII characters could cause a UnicodeDecodeError or an alias that could not be used. Thanks, winking. #1889
  • The Python API documentation now explains that a prompt passed alongside messages= is appended to that list as a new user message.