Skip to content

Commit

Permalink
cohere[patch]: Fix positional argument (langchain-ai#19678)
Browse files Browse the repository at this point in the history
cohere: Fix positional argument

Co-authored-by: Bagatur <[email protected]>
  • Loading branch information
2 people authored and gkorland committed Mar 30, 2024
1 parent 99a8c66 commit 474d6aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/partners/cohere/langchain_cohere/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ async def _agenerate(

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(
Expand Down

0 comments on commit 474d6aa

Please sign in to comment.