The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: Replace positional argument with text=text for cohere>=5 compatibility (#19407)
billytrend-coheref6bcd424211b
diff --git a/libs/community/langchain_community/chat_models/cohere.py b/libs/community/langchain_community/chat_models/cohere.pyindex e3f20ad9c4..7682f1d4ca 100644--- a/libs/community/langchain_community/chat_models/cohere.py+++ b/libs/community/langchain_community/chat_models/cohere.py@@ -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)