pub struct CompletionResponse {Show 16 fields
pub id: String,
pub object: ResponseObject,
pub created_at: u64,
pub status: ResponseStatus,
pub error: Option<ResponseError>,
pub incomplete_details: Option<IncompleteDetailsReason>,
pub instructions: Option<String>,
pub max_output_tokens: Option<u64>,
pub model: String,
pub provider_reasoning: Option<String>,
pub reasoning_metadata: Option<Map<String, Value>>,
pub reasoning_context: Option<String>,
pub usage: Option<ResponsesUsage>,
pub output: Vec<Output>,
pub tools: Vec<ResponsesToolDefinition>,
pub additional_parameters: AdditionalParameters,
}Expand description
The standard response format from OpenAI’s Responses API.
Fields§
§id: StringThe ID of a completion response.
object: ResponseObjectThe type of the object.
created_at: u64The time at which a given response has been created, in seconds from the UNIX epoch (01/01/1970 00:00:00).
status: ResponseStatusThe status of the response.
error: Option<ResponseError>Response error (optional)
incomplete_details: Option<IncompleteDetailsReason>Incomplete response details (optional)
instructions: Option<String>System prompt/preamble
max_output_tokens: Option<u64>The maximum number of tokens the model should output
model: StringThe model name
provider_reasoning: Option<String>Provider-specific top-level reasoning content returned by some OpenAI-compatible Responses implementations.
reasoning_metadata: Option<Map<String, Value>>The complete object-shaped top-level reasoning metadata returned by the provider.
Unknown fields, unknown values, and null-valued members inside the object
are preserved value-equivalently. A top-level null, missing field, or
unsupported non-object shape is normalized to no reasoning metadata.
When serializing manually constructed responses, Self::provider_reasoning
takes precedence over this field, and this field takes precedence over
Self::reasoning_context.
reasoning_context: Option<String>The effective reasoning context returned by OpenAI.
This is populated as a convenience projection of
Self::reasoning_metadata. String-shaped reasoning returned by compatible
providers remains available through Self::provider_reasoning.
usage: Option<ResponsesUsage>Token usage
output: Vec<Output>The model output (messages, etc will go here)
tools: Vec<ResponsesToolDefinition>Tools
additional_parameters: AdditionalParametersAdditional parameters
Trait Implementations§
Source§impl Clone for CompletionResponse
impl Clone for CompletionResponse
Source§fn clone(&self) -> CompletionResponse
fn clone(&self) -> CompletionResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more