langchain/.github
ccurme 1538ee17f9
anthropic[major]: support python 3.13 (#27916)
Last week Anthropic released version 0.39.0 of its python sdk, which
enabled support for Python 3.13. This release deleted a legacy
`client.count_tokens` method, which we currently access during init of
the `Anthropic` LLM. Anthropic has replaced this functionality with the
[client.beta.messages.count_tokens()
API](https://github.com/anthropics/anthropic-sdk-python/pull/726).

To enable support for `anthropic >= 0.39.0` and Python 3.13, here we
drop support for the legacy token counting method, and add support for
the new method via `ChatAnthropic.get_num_tokens_from_messages`.

To fully support the token counting API, we update the signature of
`get_num_tokens_from_message` to accept tools everywhere.

---------

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
2024-11-12 14:31:07 -05:00
..
actions infra: update mypy 1.10, ruff 0.5 (#23721) 2024-07-03 10:33:27 -07:00
DISCUSSION_TEMPLATE ci: restore qa template that was known to work (#26684) 2024-09-19 17:20:42 -04:00
ISSUE_TEMPLATE ci: updates issue and discussion templates (#26542) 2024-09-16 17:43:04 +00:00
scripts anthropic[major]: support python 3.13 (#27916) 2024-11-12 14:31:07 -05:00
tools
workflows infra: remove google creds from release and integration test workflows (#27950) 2024-11-07 00:31:10 +00:00
CODE_OF_CONDUCT.md
CODEOWNERS infra: starter codeowners file (#27929) 2024-11-05 16:43:11 -08:00
CONTRIBUTING.md Docs: Contributing changes (#17551) 2024-02-14 17:55:09 -05:00
PULL_REQUEST_TEMPLATE.md templates,docs: leave templates in v0.2 (#27952) 2024-11-07 22:23:48 +00:00