[Bugfix][Responses API] Build streamed final response from streamed items (#59307)
Signed-off-by: sfeng33 <4florafeng@gmail.com>
This commit is contained in:
@@ -194,6 +194,9 @@ class SimpleContext(ConversationContext):
|
||||
self._accumulated_text: str = ""
|
||||
self._accumulated_token_ids: list[int] = []
|
||||
self._accumulated_logprobs: list = []
|
||||
# Items already sent as output_item.done events; the final
|
||||
# streaming response reuses them instead of reparsing.
|
||||
self.streamed_output_items: list[ResponseOutputItem] | None = None
|
||||
|
||||
self.num_prompt_tokens = 0
|
||||
self.num_output_tokens = 0
|
||||
|
||||
Reference in New Issue
Block a user