pub struct TranscriptReporter { /* private fields */ }Expand description
Reporter that captures the evolving conversation transcript.
TranscriptReporter listens for AgentEvent::InputAccepted and
AgentEvent::TurnFinished events and accumulates their Items
into a TranscriptView. This is useful for post-run analysis or
for displaying a conversation history.
§Example
use agentkit_reporting::TranscriptReporter;
use agentkit_loop::LoopObserver;
let mut reporter = TranscriptReporter::new();
// ...pass `reporter` to the agent loop, then afterwards:
for item in &reporter.transcript().items {
println!("{:?}: {} parts", item.kind, item.parts.len());
}Implementations§
Source§impl TranscriptReporter
impl TranscriptReporter
Sourcepub fn transcript(&self) -> &TranscriptView
pub fn transcript(&self) -> &TranscriptView
Returns a reference to the current TranscriptView.
Trait Implementations§
Source§impl Default for TranscriptReporter
impl Default for TranscriptReporter
Source§fn default() -> TranscriptReporter
fn default() -> TranscriptReporter
Returns the “default value” for a type. Read more
Source§impl LoopObserver for TranscriptReporter
impl LoopObserver for TranscriptReporter
Source§fn handle_event(&mut self, event: AgentEvent)
fn handle_event(&mut self, event: AgentEvent)
Called synchronously for every
AgentEvent emitted by the loop driver.Auto Trait Implementations§
impl Freeze for TranscriptReporter
impl RefUnwindSafe for TranscriptReporter
impl Send for TranscriptReporter
impl Sync for TranscriptReporter
impl Unpin for TranscriptReporter
impl UnsafeUnpin for TranscriptReporter
impl UnwindSafe for TranscriptReporter
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