pub struct AgentResponse {
pub text: String,
pub tool_calls: Vec<ToolCallInfo>,
pub token_usage: Option<TokenUsageStats>,
pub duration: Duration,
pub model_calls: usize,
}Expand description
Response from Agent.run() containing the result and execution statistics
Fields§
§text: StringThe final text response from the agent
tool_calls: Vec<ToolCallInfo>All tool calls made during this run
token_usage: Option<TokenUsageStats>Total token usage across all model calls (if available)
duration: DurationTotal execution time
model_calls: usizeNumber of model calls made (includes retries after tool use)
Implementations§
Trait Implementations§
Source§impl Clone for AgentResponse
impl Clone for AgentResponse
Source§fn clone(&self) -> AgentResponse
fn clone(&self) -> AgentResponse
Returns a duplicate of the value. Read more
1.0.0 · 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 AgentResponse
impl Debug for AgentResponse
Source§impl Display for AgentResponse
impl Display for AgentResponse
Source§impl From<AgentResponse> for String
impl From<AgentResponse> for String
Source§fn from(response: AgentResponse) -> Self
fn from(response: AgentResponse) -> Self
Converts to this type from the input type.
Source§impl PartialEq<&str> for AgentResponse
impl PartialEq<&str> for AgentResponse
Auto Trait Implementations§
impl Freeze for AgentResponse
impl RefUnwindSafe for AgentResponse
impl Send for AgentResponse
impl Sync for AgentResponse
impl Unpin for AgentResponse
impl UnwindSafe for AgentResponse
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