openai[patch], standard-tests[patch]: don't pass in falsey stop vals (#23153)

adds an image input test to standard-tests as well
This commit is contained in:
Bagatur
2024-06-18 18:13:13 -07:00
committed by GitHub
parent e8a8286012
commit 90559fde70
12 changed files with 730 additions and 57 deletions

View File

@@ -443,11 +443,12 @@ class BaseChatOpenAI(BaseChatModel):
"stream": self.streaming,
"n": self.n,
"temperature": self.temperature,
"stop": self.stop,
**self.model_kwargs,
}
if self.max_tokens is not None:
params["max_tokens"] = self.max_tokens
if self.stop:
params["stop"] = self.stop
return params
def _combine_llm_outputs(self, llm_outputs: List[Optional[dict]]) -> dict: