Skip to content

chatlas 0.12.0

Choose a tag to compare

@cpsievert cpsievert released this 08 Sep 16:53
· 49 commits to main since this release

Breaking changes

  • ChatAuto()'s first (optional) positional parameter has changed from system_prompt to provider_model, and system_prompt is now a keyword parameter. As a result, you may need to change ChatAuto("[system prompt]") -> ChatAuto(system_prompt="[system prompt]"). In addition, the provider and model keyword arguments are now deprecated, but continue to work with a warning, as are the previous CHATLAS_CHAT_PROVIDER and CHATLAS_CHAT_MODEL environment variables. (#159)

New features

  • ChatAuto()'s new provider_model takes both provider and model in a single string in the format "{provider}/{model}", e.g. "openai/gpt-5". If not provided, ChatAuto() looks for the CHATLAS_CHAT_PROVIDER_MODEL environment variable, defaulting to "openai" if neither are provided. Unlike previous versions of ChatAuto(), the environment variables are now used only if function arguments are not provided. In other words, if provider_model is given, the CHATLAS_CHAT_PROVIDER_MODEL environment variable is ignored. Similarly, CHATLAS_CHAT_ARGS are only used if no kwargs are provided. This improves interactive use cases, makes it easier to introduce application-specific environment variables, and puts more control in the hands of the developer. (#159)
  • The .register_tool() method now:
    • Accepts a Tool instance as input. This is primarily useful for binding things like annotations to the Tool in one place, and registering it in another. (#172)
    • Supports function parameter names that start with an underscore. (#174)
  • The ToolAnnotations type gains an extra key field -- providing a place for providing additional information that other consumers of tool annotations (e.g., shinychat) may make use of.

Bug fixes

  • ChatAuto() now supports recently added providers such as ChatCloudflare(), ChatDeepseek(), ChatHuggingFace(), etc. (#159)