pub struct StreamingCompletionResponse {
pub usage: ResponsesUsage,
pub reasoning_metadata: Option<Map<String, Value>>,
pub reasoning_context: Option<String>,
pub status: Option<ResponseStatus>,
pub incomplete_details: Option<IncompleteDetailsReason>,
pub message_id: Option<String>,
pub response_id: Option<String>,
pub model: Option<String>,
pub provider_request_id: Option<String>,
}Expand description
The final streaming response from the OpenAI Responses API.
This is the provider-native terminal record carried by
[GenericResponsesCompletionModel::raw_stream]. The normalized path maps it
once, through crate::streaming::normalize_stream, into a
streaming::StreamFinal.
Fields§
§usage: ResponsesUsageToken usage
reasoning_metadata: Option<Map<String, Value>>The complete object-shaped reasoning metadata from the terminal response event.
reasoning_context: Option<String>The effective reasoning context from the terminal response event.
status: Option<ResponseStatus>The status reported by the terminal response.completed event.
incomplete_details: Option<IncompleteDetailsReason>Why the response stopped short, when the provider said so.
message_id: Option<String>The assistant message ID (msg_...) carried by the terminal response’s
output items.
Distinct from Self::response_id (resp_...), which names the whole
response.
response_id: Option<String>The response ID (resp_...) reported by the terminal
response.completed event.
model: Option<String>The model identifier reported by the terminal response event.
provider_request_id: Option<String>The transport request id from the SSE connection’s x-request-id
response header — not part of any stream frame; stamped by the
transport. None when the provider did not report one.
Implementations§
Source§impl StreamingCompletionResponse
impl StreamingCompletionResponse
Sourcepub fn new(usage: ResponsesUsage) -> StreamingCompletionResponse
pub fn new(usage: ResponsesUsage) -> StreamingCompletionResponse
Create a terminal record carrying only usage; the remaining metadata is
filled in from the terminal response.completed event as it arrives.
Trait Implementations§
Source§impl Clone for StreamingCompletionResponse
impl Clone for StreamingCompletionResponse
Source§fn clone(&self) -> StreamingCompletionResponse
fn clone(&self) -> StreamingCompletionResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more