fix: little lint thing (#34310)

to be merged into https://github.com/langchain-ai/langchain/pull/32810
This commit is contained in:
Sydney Runkle
2025-12-12 08:47:51 -05:00
committed by GitHub
parent bbc1d46efe
commit 6a2a149f89

View File

@@ -120,7 +120,7 @@ Example:
def _get_approximate_token_counter(model: BaseChatModel) -> TokenCounter:
"""Tune parameters of approximate token counter based on model type."""
if model._llm_type == "anthropic-chat":
if model._llm_type == "anthropic-chat": # noqa: SLF001
# 3.3 was estimated in an offline experiment, comparing with Claude's token-counting
# API: https://platform.claude.com/docs/en/build-with-claude/token-counting
return partial(count_tokens_approximately, chars_per_token=3.3)