pub struct Exchange<C, R> {
pub call_id: Option<String>,
pub calls: Vec<C>,
pub results: Vec<R>,
}Expand description
Groups tool calls and results of one built-in tool family for a single interaction.
Fields§
§call_id: Option<String>Call identifier used to match calls to results.
calls: Vec<C>One or more tool calls.
results: Vec<R>One or more tool results.
Implementations§
Source§impl Exchange<GoogleSearchCallContent, GoogleSearchResultContent>
impl Exchange<GoogleSearchCallContent, GoogleSearchResultContent>
Sourcepub fn queries(&self) -> Vec<String>
pub fn queries(&self) -> Vec<String>
Collects all queries from the stored Google Search tool calls.
Sourcepub fn result_items(&self) -> Vec<GoogleSearchResult>
pub fn result_items(&self) -> Vec<GoogleSearchResult>
Collects all Google Search result entries from tool results.
Source§impl Exchange<UrlContextCallContent, UrlContextResultContent>
impl Exchange<UrlContextCallContent, UrlContextResultContent>
Sourcepub fn result_items(&self) -> Vec<UrlContextResult>
pub fn result_items(&self) -> Vec<UrlContextResult>
Collects all URL context result entries from tool results.
Trait Implementations§
Auto Trait Implementations§
impl<C, R> Freeze for Exchange<C, R>
impl<C, R> RefUnwindSafe for Exchange<C, R>where
C: RefUnwindSafe,
R: RefUnwindSafe,
impl<C, R> Send for Exchange<C, R>
impl<C, R> Sync for Exchange<C, R>
impl<C, R> Unpin for Exchange<C, R>
impl<C, R> UnsafeUnpin for Exchange<C, R>
impl<C, R> UnwindSafe for Exchange<C, R>where
C: UnwindSafe,
R: UnwindSafe,
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