mistral: fix of issue #26029 (#28233)

- Description: Azure AI takes an issue with the safe_mode parameter
being set to False instead of None. Therefore, this PR changes the
default value of safe_mode from False to None. This results in it being
filtered out before the request is sent - avoind the extra-parameter
issue described below.

- Issue: #26029

- Dependencies: /

---------

Co-authored-by: blaufink <sebastian.brueckner@outlook.de>
Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
blaufink 2024-12-06 00:28:12 +01:00 committed by GitHub
parent 7a96ce1320
commit 28f8d436f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -388,7 +388,7 @@ class ChatMistralAI(BaseChatModel):
"""Decode using nucleus sampling: consider the smallest set of tokens whose
probability sum is at least top_p. Must be in the closed interval [0.0, 1.0]."""
random_seed: Optional[int] = None
safe_mode: bool = False
safe_mode: Optional[bool] = None
streaming: bool = False
model_config = ConfigDict(