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

cohere: Fix positional argument

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
pull/19676/head^2
billytrend-cohere 6 months ago committed by GitHub
parent fdfb51ad8d
commit 36abb5dd41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

Loading…
Cancel
Save