#[non_exhaustive]pub struct ResponseObject {Show 23 fields
pub created_at: i64,
pub error: Option<ResponseError>,
pub id: String,
pub incomplete_details: Option<ResponseIncompleteDetails>,
pub instructions: Option<String>,
pub max_output_tokens: Option<i32>,
pub metadata: Option<Metadata>,
pub model: String,
pub object: String,
pub output: Vec<OutputItem>,
pub parallel_tool_calls: bool,
pub previous_response_id: Option<String>,
pub reasoning: Option<Reasoning>,
pub status: String,
pub stream: Option<bool>,
pub temperature: Option<f32>,
pub text: Option<TextResponseFormatConfigurationOptions>,
pub tool_choice: Option<ToolChoice>,
pub tools: Option<Vec<Tool>>,
pub top_p: Option<f32>,
pub truncation: Option<String>,
pub usage: Option<ResponseUsage>,
pub user: Option<String>,
}Expand description
Represents a response generated by the model via the Responses API.
Corresponds to the Response schema in the OpenAPI spec.
§Used By
/responses(POST response)/responses/{response_id}(GET response)RealtimeServerEventResponseCreated(withinrealtime_shared.rs)RealtimeServerEventResponseDone(withinrealtime_shared.rs)RealtimeServerEventResponseFailed(withinrealtime_shared.rs)RealtimeServerEventResponseIncomplete(withinrealtime_shared.rs)RealtimeServerEventResponseInProgress(withinrealtime_shared.rs)
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.created_at: i64Unix timestamp (in seconds) of when this Response was created.
error: Option<ResponseError>The error object if the response status is failed. Null otherwise.
id: StringUnique identifier for this Response.
incomplete_details: Option<ResponseIncompleteDetails>Details about why the response is incomplete, if applicable. Null otherwise.
instructions: Option<String>System instructions provided.
max_output_tokens: Option<i32>Maximum output tokens allowed.
metadata: Option<Metadata>Metadata associated with the response.
model: StringModel ID used for the response. *** CHANGED TO String ***
object: StringThe object type, always “response”.
output: Vec<OutputItem>An array of content items generated by the model.
parallel_tool_calls: boolWhether parallel tool calls were enabled.
previous_response_id: Option<String>ID of the previous response in the conversation.
reasoning: Option<Reasoning>Reasoning configuration used.
status: StringThe status of the response generation (completed, failed, in_progress, incomplete).
stream: Option<bool>Whether to stream the response. Defaults to false.
temperature: Option<f32>Sampling temperature.
text: Option<TextResponseFormatConfigurationOptions>Text response format configuration.
tool_choice: Option<ToolChoice>Tool choice strategy used.
tools: Option<Vec<Tool>>Tools available to the model.
top_p: Option<f32>Nucleus sampling probability.
truncation: Option<String>Truncation strategy (“auto” or “disabled”).
usage: Option<ResponseUsage>Usage statistics for the request. Null if status is not completed.
user: Option<String>End-user identifier.
Implementations§
Source§impl ResponseObject
impl ResponseObject
Sourcepub fn former() -> ResponseObjectFormer<ResponseObjectFormerDefinition<(), ResponseObject, ReturnPreformed>>
pub fn former() -> ResponseObjectFormer<ResponseObjectFormerDefinition<(), ResponseObject, ReturnPreformed>>
Provides a mechanism to initiate the formation process with a default completion behavior.
Trait Implementations§
Source§impl Clone for ResponseObject
impl Clone for ResponseObject
Source§fn clone(&self) -> ResponseObject
fn clone(&self) -> ResponseObject
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
Source§impl<__Context, __Formed, __End> EntityToDefinition<__Context, __Formed, __End> for ResponseObjectwhere
__End: FormingEnd<ResponseObjectFormerDefinitionTypes<__Context, __Formed>>,
impl<__Context, __Formed, __End> EntityToDefinition<__Context, __Formed, __End> for ResponseObjectwhere
__End: FormingEnd<ResponseObjectFormerDefinitionTypes<__Context, __Formed>>,
Source§type Definition = ResponseObjectFormerDefinition<__Context, __Formed, __End>
type Definition = ResponseObjectFormerDefinition<__Context, __Formed, __End>
FormerDefinition associated with this entity. Read moreSource§type Types = ResponseObjectFormerDefinitionTypes<__Context, __Formed>
type Types = ResponseObjectFormerDefinitionTypes<__Context, __Formed>
FormerDefinitionTypes associated with this entity. Read moreSource§impl<__Context, __Formed> EntityToDefinitionTypes<__Context, __Formed> for ResponseObject
impl<__Context, __Formed> EntityToDefinitionTypes<__Context, __Formed> for ResponseObject
Source§impl<Definition> EntityToFormer<Definition> for ResponseObjectwhere
Definition: FormerDefinition<Storage = ResponseObjectFormerStorage>,
impl<Definition> EntityToFormer<Definition> for ResponseObjectwhere
Definition: FormerDefinition<Storage = ResponseObjectFormerStorage>,
Source§impl EntityToStorage for ResponseObject
impl EntityToStorage for ResponseObject
Source§impl PartialEq for ResponseObject
impl PartialEq for ResponseObject
Source§impl Serialize for ResponseObject
impl Serialize for ResponseObject
impl StructuralPartialEq for ResponseObject
Auto Trait Implementations§
impl Freeze for ResponseObject
impl RefUnwindSafe for ResponseObject
impl Send for ResponseObject
impl Sync for ResponseObject
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
Source§type Val = <C as Collection>::Val
type Val = <C as Collection>::Val
Entry in complex collections.
For example, in a HashMap, while Entry might be a ( key, value ) tuple, Val might only be the value part.Source§fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
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> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
Source§fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
Invokes the val_to_entry function of the CollectionValToEntry trait to convert the value to an entry.
Source§type Entry = <C as CollectionValToEntry<Val>>::Entry
type Entry = <C as CollectionValToEntry<Val>>::Entry
Entry is defined by the Collection trait.