Skip to content

The agent engineering platform.

change chat default (#1782)

Harrison Chaseb1b4a4065a68
diff --git a/langchain/chat_models/openai.py b/langchain/chat_models/openai.py
index f6e0f3819e..45a495af45 100644
--- a/langchain/chat_models/openai.py
+++ b/langchain/chat_models/openai.py
@@ -128,7 +128,7 @@ class ChatOpenAI(BaseChatModel, BaseModel):
"""Whether to stream the results or not."""
n: int = 1
"""Number of chat completions to generate for each prompt."""
- max_tokens: int = 256
+ max_tokens: Optional[int] = None
"""Maximum number of tokens to generate."""
class Config: