mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-23 23:29:21 +00:00
community[patch]: Replace positional argument with text=text for cohere>=5 compatibility (#19407)
- **Description:** Replace positional argument with text=text for cohere>=5 compatibility
This commit is contained in:
parent
b20c2640da
commit
f6bcd42421
@ -244,4 +244,4 @@ 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)
|
||||
|
Loading…
Reference in New Issue
Block a user