pub struct Response {Show 27 fields
pub id: String,
pub object: String,
pub created_at: usize,
pub status: String,
pub background: bool,
pub error: Option<String>,
pub incomplete_details: Option<String>,
pub instructions: Option<String>,
pub max_output_tokens: Option<usize>,
pub max_tool_calls: Option<usize>,
pub model: String,
pub output: Vec<Output>,
pub parallel_tool_calls: bool,
pub previous_response_id: Option<String>,
pub reasoning: Reasoning,
pub service_tier: Option<String>,
pub store: Option<bool>,
pub temperature: Option<f64>,
pub text: 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: 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: StringUnique identifier for this response
object: StringObject type, typically “response”
created_at: usizeUnix timestamp when the response was created
status: StringStatus of the response processing
background: boolWhether the response was processed in the background
error: Option<String>Error message if the request failed
incomplete_details: Option<String>Details about incomplete responses
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: StringThe model that was used to generate the response
output: Vec<Output>List of outputs from the AI (text, function calls, etc.)
parallel_tool_calls: boolWhether parallel tool calls were enabled
previous_response_id: Option<String>ID of the previous response in a conversation chain
reasoning: ReasoningReasoning 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: TextText 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: HashMap<String, String>Additional metadata as key-value pairs
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().