File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
libs/langchain_v1/langchain/agents/middleware Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -144,10 +144,8 @@ def _get_approximate_token_counter(model: BaseChatModel) -> TokenCounter:
144144 if model ._llm_type == "anthropic-chat" : # noqa: SLF001
145145 # 3.3 was estimated in an offline experiment, comparing with Claude's token-counting
146146 # API: https://platform.claude.com/docs/en/build-with-claude/token-counting
147- return partial (
148- count_tokens_approximately , chars_per_token = 3.3 , use_usage_metadata_scaling = True
149- )
150- return partial (count_tokens_approximately , use_usage_metadata_scaling = True )
147+ return partial (count_tokens_approximately , chars_per_token = 3.3 )
148+ return count_tokens_approximately
151149
152150
153151class SummarizationMiddleware (AgentMiddleware ):
You can’t perform that action at this time.
0 commit comments