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 William Fu-Hinthorn
parent 8329cae709
commit 5ce18038c3

View File

@@ -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(