pub struct ResponseObject {
pub id: String,
pub object: String,
pub created_at: u64,
pub status: String,
pub model: String,
pub output: Vec<ResponseOutputItem>,
pub usage: Option<ResponseUsage>,
pub error: Option<Value>,
}Expand description
The full response object returned by the Responses API (non-stream mode, or carried inside the terminal streaming events).
Fields§
§id: String§object: String§created_at: u64§status: String§model: String§output: Vec<ResponseOutputItem>§usage: Option<ResponseUsage>§error: Option<Value>Implementations§
Source§impl ResponseObject
impl ResponseObject
Sourcepub fn output_text(&self) -> String
pub fn output_text(&self) -> String
Concatenated assistant text of all message items in output order.
Sourcepub fn reasoning_text(&self) -> String
pub fn reasoning_text(&self) -> String
Concatenated chain-of-thought text of all reasoning items.
Sourcepub fn function_calls(&self) -> Vec<&ResponseOutputItem>
pub fn function_calls(&self) -> Vec<&ResponseOutputItem>
All function call items (for tool execution).
Trait Implementations§
Source§impl Clone for ResponseObject
impl Clone for ResponseObject
Source§fn clone(&self) -> ResponseObject
fn clone(&self) -> ResponseObject
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResponseObject
impl Debug for ResponseObject
Source§impl<'de> Deserialize<'de> for ResponseObject
impl<'de> Deserialize<'de> for ResponseObject
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ResponseObject
impl RefUnwindSafe for ResponseObject
impl Send for ResponseObject
impl Sync for ResponseObject
impl Unpin for ResponseObject
impl UnsafeUnpin for ResponseObject
impl UnwindSafe for ResponseObject
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
Mutably borrows from an owned value. Read more