pub struct Response {Show 28 fields
pub id: Option<String>,
pub object: Option<String>,
pub created_at: Option<usize>,
pub completed_at: Option<u64>,
pub status: Option<String>,
pub background: Option<bool>,
pub error: Option<Value>,
pub incomplete_details: Option<Value>,
pub instructions: Option<String>,
pub max_output_tokens: Option<usize>,
pub max_tool_calls: Option<usize>,
pub model: Option<String>,
pub output: Option<Vec<Output>>,
pub parallel_tool_calls: Option<bool>,
pub previous_response_id: Option<String>,
pub reasoning: Option<Reasoning>,
pub service_tier: Option<String>,
pub store: Option<bool>,
pub temperature: Option<f64>,
pub text: Option<Text>,
pub tool_choice: Option<String>,
pub tools: Option<Vec<Tool>>,
pub top_logprobs: Option<usize>,
pub top_p: Option<f64>,
pub truncation: Option<String>,
pub usage: Option<Usage>,
pub user: Option<String>,
pub metadata: Option<HashMap<String, String>>,
}Expand description
Complete response from the OpenAI Responses API.
This struct contains all the information returned by the API, including the AI’s outputs, usage statistics, and metadata about the request processing.
Fields§
§id: Option<String>Unique identifier for this response
object: Option<String>Object type, typically “response”
created_at: Option<usize>Unix timestamp when the response was created
completed_at: Option<u64>Unix timestamp when the response completed
status: Option<String>Status of the response processing
background: Option<bool>Whether the response was processed in the background
error: Option<Value>Error details if the request failed
incomplete_details: Option<Value>Details about incomplete responses (e.g., {"reason": "max_output_tokens"})
instructions: Option<String>Instructions that were used for this response
max_output_tokens: Option<usize>Maximum number of output tokens that were allowed
max_tool_calls: Option<usize>Maximum number of tool calls that were allowed
model: Option<String>The model that was used to generate the response
output: Option<Vec<Output>>List of outputs from the AI (text, function calls, etc.)
parallel_tool_calls: Option<bool>Whether parallel tool calls were enabled
previous_response_id: Option<String>ID of the previous response in a conversation chain
reasoning: Option<Reasoning>Reasoning information from the AI
service_tier: Option<String>Service tier used for processing
store: Option<bool>Whether the response should be stored
temperature: Option<f64>Temperature setting used for generation
text: Option<Text>Text formatting configuration
tool_choice: Option<String>Tool choice configuration that was used
tools: Option<Vec<Tool>>Tools that were available during generation
top_logprobs: Option<usize>Number of top log probabilities returned
top_p: Option<f64>Top-p (nucleus sampling) parameter used
truncation: Option<String>Truncation strategy that was applied
usage: Option<Usage>Token usage statistics
user: Option<String>User identifier associated with the request
metadata: Option<HashMap<String, String>>Additional metadata as key-value pairs