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§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.
Auto Trait Implementations§
impl Freeze for AgentResponse
impl RefUnwindSafe for AgentResponse
impl Send for AgentResponse
impl Sync for AgentResponse
impl Unpin for AgentResponse
impl UnsafeUnpin 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