mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-08 14:31:55 +00:00
openai[patch]: include 'type' key internally when streaming reasoning blocks (#31661)
Covered by existing tests. Will make it easier to process streamed reasoning blocks.
This commit is contained in:
@@ -3756,6 +3756,7 @@ def _convert_responses_chunk_to_generation_chunk(
|
||||
{"index": chunk.summary_index, "type": "summary_text", "text": ""}
|
||||
],
|
||||
"index": current_index,
|
||||
"type": "reasoning",
|
||||
}
|
||||
)
|
||||
elif chunk.type == "response.image_generation_call.partial_image":
|
||||
@@ -3773,6 +3774,7 @@ def _convert_responses_chunk_to_generation_chunk(
|
||||
}
|
||||
],
|
||||
"index": current_index,
|
||||
"type": "reasoning",
|
||||
}
|
||||
)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user