You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.stream() and .stream_async() gain a content argument. Set this to "all" to include ContentToolResult/ContentToolRequest objects in the stream. (#75)
ContentToolResult/ContentToolRequest are now exported to chatlas namespace. (#75)
ContentToolResult/ContentToolRequest gain a .tagify() method so they render sensibly in a Shiny app. (#75)
A tool can now return a ContentToolResult. This is useful for:
Specifying the format used for sending the tool result to the chat model (model_format). (#87)
Custom rendering of the tool result (by overriding relevant methods in a subclass). (#75)
Chat gains a new .current_display property. When a .chat() or .stream() is currently active, this property returns an object with a .echo() method (to echo new content to the display). This is primarily useful for displaying custom content during a tool call. (#79)
Improvements
When a tool call ends in failure, a warning is now raised and the stacktrace is printed. (#79)
Fixed an issue with more than one session being active at once. (#83)
ChatAnthropic() no longer chokes after receiving an output that consists only of whitespace. (#86)
orjson is now used for JSON loading and dumping. (#87)
Changes
The echo argument of the .chat() method defaults to a new value of "output". As a result, tool requests and results are now echoed by default. To revert to the previous behavior, set echo="text". (#78)
Tool results are now dumped to JSON by default before being sent to the model. To revert to the previous behavior, have the tool return a ContentToolResult with model_format="str". (#87)
Breaking changes
The .export() method's include argument has been renamed to content (to match .stream()). (#75)