mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-05 12:48:12 +00:00
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:
parent
fdfb51ad8d
commit
36abb5dd41
@ -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…
Reference in New Issue
Block a user