langchain-anthropic==0.3.0
Version 0.39.0 of the Anthropic Python SDK enables support for Python 3.13. This involved the deletion of a legacy client.count_tokens
method. langchain-anthropic 0.3.0
drops support for token counting via this method on the Anthropic
LLM.
Anthropic has replaced this functionality with the client.beta.messages.count_tokens() API. This release adds support for token counting using this API via ChatAnthropic.get_num_tokens_from_messages. This required adding an optional tools
parameter to the signature of .get_num_tokens_from_messages
.
Changes since langchain-anthropic==0.2.4
anthropic[major]: release 0.3.0 (#28063)
anthropic[major]: support python 3.13 (#27916)
anthropic[patch]: remove retired model from tests (#27965)