pub struct AgentTurn {
pub id: Uuid,
pub timestamp: DateTime<Utc>,
pub user: UserMessage,
pub steps: Vec<AgentStep>,
pub stats: TurnStats,
}Fields§
§id: Uuid§timestamp: DateTime<Utc>§user: UserMessageTurn trigger (Input)
steps: Vec<AgentStep>Agent autonomous operation cycle (Steps) Single step for simple conversation, multiple steps for autonomous agents
stats: TurnStatsImplementations§
Source§impl AgentTurn
impl AgentTurn
Sourcepub fn cumulative_input_tokens(&self, fallback: u32) -> u32
pub fn cumulative_input_tokens(&self, fallback: u32) -> u32
Calculate cumulative input tokens at the end of this turn
Falls back to fallback if no usage data found
Sourcepub fn cumulative_total_tokens(&self, fallback: u32) -> u32
pub fn cumulative_total_tokens(&self, fallback: u32) -> u32
Calculate cumulative total tokens (input + output) at the end of this turn
Falls back to fallback if no usage data found
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AgentTurn
impl<'de> Deserialize<'de> for AgentTurn
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AgentTurn
impl RefUnwindSafe for AgentTurn
impl Send for AgentTurn
impl Sync for AgentTurn
impl Unpin for AgentTurn
impl UnwindSafe for AgentTurn
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