openai[patch]: fix azure oai stream check (#28048)

This commit is contained in:
Bagatur 2024-11-12 07:42:06 -08:00 committed by GitHub
parent 9611f0b55d
commit 139881b108
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -977,7 +977,7 @@ class BaseChatOpenAI(BaseChatModel):
# TODO: Add support for streaming with Pydantic response_format.
warnings.warn("Streaming with Pydantic response_format not yet supported.")
return False
if self.model_name.startswith("o1"):
if self.model_name is not None and self.model_name.startswith("o1"):
# TODO: Add support for streaming with o1 once supported.
return False