Implementation:Openai Openai python Response Reasoning Summary Text Delta
| Knowledge Sources | |
|---|---|
| Domains | API_Types, Responses_API |
| Last Updated | 2026-02-15 00:00 GMT |
Overview
Concrete type for representing a streaming delta event emitted when text is incrementally added to a reasoning summary, provided by the openai-python SDK.
Description
ResponseReasoningSummaryTextDeltaEvent is a Pydantic model representing the response.reasoning_summary_text.delta streaming event. It is emitted each time a new text fragment (delta) is appended to a reasoning summary during streaming. The event includes item_id, output_index, and summary_index for positional context, along with a sequence_number for ordering.
Usage
Import this type when you need to process incremental reasoning summary text as it streams in, for example to display partial summaries in a UI.
Code Reference
Source Location
- Repository: openai-python
- File: src/openai/types/responses/response_reasoning_summary_text_delta_event.py
Signature
class ResponseReasoningSummaryTextDeltaEvent(BaseModel):
"""Emitted when a delta is added to a reasoning summary text."""
delta: str
item_id: str
output_index: int
sequence_number: int
summary_index: int
type: Literal["response.reasoning_summary_text.delta"]
Import
from openai.types.responses import ResponseReasoningSummaryTextDeltaEvent
I/O Contract
Fields
| Name | Type | Required | Description |
|---|---|---|---|
| delta | str | Yes | The text delta that was added to the summary. |
| item_id | str | Yes | The ID of the item this summary text delta is associated with. |
| output_index | int | Yes | The index of the output item this summary text delta is associated with. |
| sequence_number | int | Yes | The sequence number of this event. |
| summary_index | int | Yes | The index of the summary part within the reasoning summary. |
| type | Literal["response.reasoning_summary_text.delta"] | Yes | The type of the event. Always response.reasoning_summary_text.delta.
|
Usage Examples
import openai
client = openai.OpenAI()
stream = client.responses.create(
model="o3-mini",
input="Prove that the square root of 2 is irrational.",
stream=True,
)
summary_text = ""
for event in stream:
if event.type == "response.reasoning_summary_text.delta":
summary_text += event.delta
print(event.delta, end="", flush=True)