pub struct Interaction {Show 18 fields
pub id: String,
pub model: Option<String>,
pub agent: Option<String>,
pub status: Option<InteractionStatus>,
pub object: Option<String>,
pub created: Option<String>,
pub updated: Option<String>,
pub role: Option<String>,
pub steps: Vec<Step>,
pub usage: Option<InteractionUsage>,
pub system_instruction: Option<String>,
pub tools: Option<Vec<Tool>>,
pub background: Option<bool>,
pub response_modalities: Option<Vec<ResponseModality>>,
pub response_format: Option<Value>,
pub response_mime_type: Option<String>,
pub previous_interaction_id: Option<String>,
pub input: Option<InteractionInput>,
}Expand description
Interaction response payload.
Fields§
§id: String§model: Option<String>§agent: Option<String>§status: Option<InteractionStatus>§object: Option<String>§created: Option<String>§updated: Option<String>§role: Option<String>§steps: Vec<Step>§usage: Option<InteractionUsage>§system_instruction: Option<String>§tools: Option<Vec<Tool>>§background: Option<bool>§response_modalities: Option<Vec<ResponseModality>>§response_format: Option<Value>§response_mime_type: Option<String>§previous_interaction_id: Option<String>§input: Option<InteractionInput>Implementations§
Source§impl Interaction
impl Interaction
Sourcepub fn google_search_exchanges(&self) -> Vec<GoogleSearchExchange>
pub fn google_search_exchanges(&self) -> Vec<GoogleSearchExchange>
Groups Google Search tool calls and results by call_id.
When a call_id is missing, results are grouped with the most recent call (identified or not) as a best-effort fallback.
Sourcepub fn google_search_call_contents(&self) -> Vec<GoogleSearchCallContent>
pub fn google_search_call_contents(&self) -> Vec<GoogleSearchCallContent>
Collects Google Search tool call contents from the interaction outputs.
Sourcepub fn google_search_result_contents(&self) -> Vec<GoogleSearchResultContent>
pub fn google_search_result_contents(&self) -> Vec<GoogleSearchResultContent>
Collects Google Search result contents from the interaction outputs.
Sourcepub fn google_search_queries(&self) -> Vec<String>
pub fn google_search_queries(&self) -> Vec<String>
Collects all Google Search queries from tool calls in the outputs.
Sourcepub fn google_search_results(&self) -> Vec<GoogleSearchResult>
pub fn google_search_results(&self) -> Vec<GoogleSearchResult>
Collects all Google Search result entries from tool results in the outputs.
Sourcepub fn url_context_exchanges(&self) -> Vec<UrlContextExchange>
pub fn url_context_exchanges(&self) -> Vec<UrlContextExchange>
Groups URL context tool calls and results by call_id.
When a call_id is missing, results are grouped with the most recent call (identified or not) as a best-effort fallback.
Sourcepub fn url_context_call_contents(&self) -> Vec<UrlContextCallContent>
pub fn url_context_call_contents(&self) -> Vec<UrlContextCallContent>
Collects URL context tool call contents from the interaction outputs.
Sourcepub fn url_context_result_contents(&self) -> Vec<UrlContextResultContent>
pub fn url_context_result_contents(&self) -> Vec<UrlContextResultContent>
Collects URL context result contents from the interaction outputs.
Sourcepub fn url_context_urls(&self) -> Vec<String>
pub fn url_context_urls(&self) -> Vec<String>
Collects all URLs from URL context tool calls in the outputs.
Sourcepub fn url_context_results(&self) -> Vec<UrlContextResult>
pub fn url_context_results(&self) -> Vec<UrlContextResult>
Collects all URL context result entries from tool results in the outputs.
Sourcepub fn code_execution_exchanges(&self) -> Vec<CodeExecutionExchange>
pub fn code_execution_exchanges(&self) -> Vec<CodeExecutionExchange>
Groups code execution tool calls and results by call_id.
When a call_id is missing, results are grouped with the most recent call (identified or not) as a best-effort fallback.
Sourcepub fn code_execution_call_contents(&self) -> Vec<CodeExecutionCallContent>
pub fn code_execution_call_contents(&self) -> Vec<CodeExecutionCallContent>
Collects code execution tool call contents from the interaction outputs.
Sourcepub fn code_execution_result_contents(&self) -> Vec<CodeExecutionResultContent>
pub fn code_execution_result_contents(&self) -> Vec<CodeExecutionResultContent>
Collects code execution result contents from the interaction outputs.
Sourcepub fn code_execution_snippets(&self) -> Vec<String>
pub fn code_execution_snippets(&self) -> Vec<String>
Collects all code snippets from code execution calls in the outputs.
Sourcepub fn code_execution_outputs(&self) -> Vec<String>
pub fn code_execution_outputs(&self) -> Vec<String>
Collects all code execution outputs from tool results in the outputs.
Sourcepub fn text_with_inline_citations(&self) -> Option<String>
pub fn text_with_inline_citations(&self) -> Option<String>
Returns concatenated text outputs with inline citations appended.
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Returns true when the interaction is in a terminal state.
Sourcepub fn is_completed(&self) -> bool
pub fn is_completed(&self) -> bool
Returns true when the interaction completed successfully.
Trait Implementations§
Source§impl Clone for Interaction
impl Clone for Interaction
Source§fn clone(&self) -> Interaction
fn clone(&self) -> Interaction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Interaction
impl Debug for Interaction
Source§impl Default for Interaction
impl Default for Interaction
Source§fn default() -> Interaction
fn default() -> Interaction
Source§impl<'de> Deserialize<'de> for Interaction
impl<'de> Deserialize<'de> for Interaction
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Interaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Interaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl GetTokenUsage for Interaction
impl GetTokenUsage for Interaction
Source§fn token_usage(&self) -> Usage
fn token_usage(&self) -> Usage
Usage’s documented sentinel for missing provider usage metrics;
response types that carry no usage return Usage::new.