mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 18:50:33 +00:00
fix: little lint thing (#34310)
to be merged into https://github.com/langchain-ai/langchain/pull/32810
This commit is contained in:
@@ -120,7 +120,7 @@ Example:
|
|||||||
|
|
||||||
def _get_approximate_token_counter(model: BaseChatModel) -> TokenCounter:
|
def _get_approximate_token_counter(model: BaseChatModel) -> TokenCounter:
|
||||||
"""Tune parameters of approximate token counter based on model type."""
|
"""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
|
# 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
|
# API: https://platform.claude.com/docs/en/build-with-claude/token-counting
|
||||||
return partial(count_tokens_approximately, chars_per_token=3.3)
|
return partial(count_tokens_approximately, chars_per_token=3.3)
|
||||||
|
|||||||
Reference in New Issue
Block a user