openai[patch]: fix dropping response headers while streaming / Azure (#31580)

This commit is contained in:
joshy-deshaw
2025-06-24 03:29:58 +05:30
committed by GitHub
parent 8868701c16
commit 8a0782c46c

View File

@@ -793,7 +793,8 @@ class BaseChatOpenAI(BaseChatModel):
if len(choices) == 0:
# logprobs is implicitly None
generation_chunk = ChatGenerationChunk(
message=default_chunk_class(content="", usage_metadata=usage_metadata)
message=default_chunk_class(content="", usage_metadata=usage_metadata),
generation_info=base_generation_info,
)
return generation_chunk