pub struct FakeAgent { /* private fields */ }Expand description
An AgentBackend for tests: echoes, replies, fails or sleeps, and records its turns.
Implementations§
Source§impl FakeAgent
impl FakeAgent
Sourcepub fn streaming(
name: &str,
progress: Vec<AgentProgress>,
gap: Duration,
text: &str,
) -> Self
pub fn streaming( name: &str, progress: Vec<AgentProgress>, gap: Duration, text: &str, ) -> Self
Reports progress events gap apart, then answers text.
Sourcepub fn with_session(self, session: &str) -> Self
pub fn with_session(self, session: &str) -> Self
Returns session as the native session id and declares resume support.
Sourcepub fn enforcing(self, policies: &[ToolPolicy]) -> Self
pub fn enforcing(self, policies: &[ToolPolicy]) -> Self
Declares the tool policies it enforces.
Trait Implementations§
Source§impl AgentBackend for FakeAgent
impl AgentBackend for FakeAgent
Auto Trait Implementations§
impl !Freeze for FakeAgent
impl RefUnwindSafe for FakeAgent
impl Send for FakeAgent
impl Sync for FakeAgent
impl Unpin for FakeAgent
impl UnsafeUnpin for FakeAgent
impl UnwindSafe for FakeAgent
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