From b1b4a4065a68586a7cb0ef5e047a00355bd52fda Mon Sep 17 00:00:00 2001 From: Harrison Chase Date: Sun, 19 Mar 2023 10:01:59 -0700 Subject: [PATCH] change chat default (#1782) Resolves https://github.com/hwchase17/langchain/issues/1532, resolves https://github.com/hwchase17/langchain/issues/1652. --- langchain/chat_models/openai.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langchain/chat_models/openai.py b/langchain/chat_models/openai.py index f6e0f381..45a495af 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: