From 718c9cbe3a550eadcef6a446ccd36a9746e12475 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Thu, 18 Apr 2024 16:12:33 -0400 Subject: [PATCH] mistral[patch]: Support both model and model_name (#20557) --- libs/partners/mistralai/langchain_mistralai/chat_models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/partners/mistralai/langchain_mistralai/chat_models.py b/libs/partners/mistralai/langchain_mistralai/chat_models.py index 7e023cbf0cf..ab3027c94d9 100644 --- a/libs/partners/mistralai/langchain_mistralai/chat_models.py +++ b/libs/partners/mistralai/langchain_mistralai/chat_models.py @@ -315,8 +315,7 @@ class ChatMistralAI(BaseChatModel): max_retries: int = 5 timeout: int = 120 max_concurrent_requests: int = 64 - - model: str = "mistral-small" + model: str = Field(default="mistral-small", alias="model_name") temperature: float = 0.7 max_tokens: Optional[int] = None top_p: float = 1