mirror of
https://github.com/hwchase17/langchain
synced 2024-11-08 07:10:35 +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:
|
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(
|
||||||
|
Loading…
Reference in New Issue
Block a user