Skip to content

The agent engineering platform.

Increase `request_timeout` on ChatOpenAI (#3910)

Tim Asp9c89ff8bd9b3
diff --git a/langchain/chat_models/openai.py b/langchain/chat_models/openai.py
index cd5efb1c32..ca851f6da8 100644
--- a/langchain/chat_models/openai.py
+++ b/langchain/chat_models/openai.py
@@ -120,7 +120,7 @@ class ChatOpenAI(BaseChatModel):
"""Holds any model parameters valid for `create` call not explicitly specified."""
openai_api_key: Optional[str] = None
openai_organization: Optional[str] = None
- request_timeout: int = 60
+ request_timeout: int = 120
"""Timeout in seconds for the OpenAPI request."""
max_retries: int = 6
"""Maximum number of retries to make when generating."""