mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
Revert "integrations[patch]: remove non-required chat param defaults" (#29048)
Reverts langchain-ai/langchain#26730 discuss best way to release default changes (esp openai temperature)
This commit is contained in:
@@ -95,11 +95,8 @@ def _create_retry_decorator(
|
||||
"""Returns a tenacity retry decorator, preconfigured to handle exceptions"""
|
||||
|
||||
errors = [httpx.RequestError, httpx.StreamError]
|
||||
kwargs: dict = dict(
|
||||
error_types=errors, max_retries=llm.max_retries, run_manager=run_manager
|
||||
)
|
||||
return create_base_retry_decorator(
|
||||
**{k: v for k, v in kwargs.items() if v is not None}
|
||||
error_types=errors, max_retries=llm.max_retries, run_manager=run_manager
|
||||
)
|
||||
|
||||
|
||||
@@ -383,13 +380,13 @@ class ChatMistralAI(BaseChatModel):
|
||||
default_factory=secret_from_env("MISTRAL_API_KEY", default=None),
|
||||
)
|
||||
endpoint: Optional[str] = Field(default=None, alias="base_url")
|
||||
max_retries: Optional[int] = None
|
||||
timeout: Optional[int] = None
|
||||
max_concurrent_requests: Optional[int] = None
|
||||
max_retries: int = 5
|
||||
timeout: int = 120
|
||||
max_concurrent_requests: int = 64
|
||||
model: str = Field(default="mistral-small", alias="model_name")
|
||||
temperature: Optional[float] = None
|
||||
temperature: float = 0.7
|
||||
max_tokens: Optional[int] = None
|
||||
top_p: Optional[float] = None
|
||||
top_p: float = 1
|
||||
"""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
|
||||
|
||||
Reference in New Issue
Block a user