cohere[patch]: Fix positional argument (#19678)

cohere: Fix positional argument

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
This commit is contained in:
billytrend-cohere 2024-03-27 21:26:08 -05:00 committed by GitHub
parent fdfb51ad8d
commit 36abb5dd41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -303,7 +303,7 @@ class ChatCohere(BaseChatModel, BaseCohere):
def get_num_tokens(self, text: str) -> int: def get_num_tokens(self, text: str) -> int:
"""Calculate number of tokens.""" """Calculate number of tokens."""
return len(self.client.tokenize(text).tokens) return len(self.client.tokenize(text=text).tokens)
def _format_cohere_tool_calls( def _format_cohere_tool_calls(