mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-16 15:04:13 +00:00
Standardized openai init params (#21739)
## Patch Summary community:openai[patch]: standardize init args ## Details I made changes to the OpenAI Chat API wrapper test in the Langchain open-source repository - **File**: `libs/community/tests/unit_tests/chat_models/test_openai.py` - **Changes**: - Updated `max_retries` with Pydantic Field - Updated the corresponding unit test - **Related Issues**: #20085 - Updated max_retries with Pydantic Field, updated the unit test. --------- Co-authored-by: JuHyung Son <sonju0427@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""OpenAI chat wrapper."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
@@ -217,7 +218,7 @@ class ChatOpenAI(BaseChatModel):
|
||||
)
|
||||
"""Timeout for requests to OpenAI completion API. Can be float, httpx.Timeout or
|
||||
None."""
|
||||
max_retries: int = 2
|
||||
max_retries: int = Field(default=2)
|
||||
"""Maximum number of retries to make when generating."""
|
||||
streaming: bool = False
|
||||
"""Whether to stream the results or not."""
|
||||
|
Reference in New Issue
Block a user