fix max_tokens (#12964)

This commit is contained in:
Bagatur
2023-11-06 15:36:05 -08:00
committed by GitHub
parent a9002a82b8
commit 3bb8030a6e
2 changed files with 3 additions and 3 deletions

View File

@@ -323,7 +323,7 @@ class ChatOpenAI(BaseChatModel):
"temperature": self.temperature,
**self.model_kwargs,
}
if "vision" not in self.model_name:
if self.max_tokens is not None:
params["max_tokens"] = self.max_tokens
return params