Skip to content

chatlas 0.13.0

Choose a tag to compare

@cpsievert cpsievert released this 10 Sep 21:12
· 44 commits to main since this release

New features

  • Added support for submitting multiple chats in one batch. With batch submission, results can take up to 24 hours to complete, but in return you pay ~50% less than usual. For more, see the reference for batch_chat(), batch_chat_text(), batch_chat_structured() and batch_chat_completed(). (#177)
  • The Chat class gains new .chat_structured() (and .chat_structured_async()) methods. These methods supersede the now deprecated .extract_data() (and .extract_data_async()). The only difference is that the new methods return a BaseModel instance (instead of a dict()), leading to a better type hinting/checking experience. (#175)
  • The .get_turns() method gains a tool_result_role parameter. Set tool_result_role="assistant" to collect tool result content (plus the surrounding assistant turn contents) into a single assistant turn. This is convenient for display purposes and more generally if you want the tool calling loop to be contained in a single turn. (#179)

Improvements

  • The .app() method now:
    • Enables bookmarking by default (i.e., chat session survives page reload). (#179)
    • Correctly renders pre-existing turns that contain tool calls. (#179)