pub struct Bridge { /* private fields */ }Expand description
State shared by the provider, the cell executor and the observer.
Implementations§
Source§impl Bridge
impl Bridge
pub fn new(to_actor: ToActor) -> Arc<Bridge> ⓘ
Sourcepub fn request(&self, request: Request)
pub fn request(&self, request: Request)
Send the actor a request, in order with the runtime’s own.
pub fn set_user_abort(&self, aborted: bool)
Sourcepub fn answer_committed(&self, message: AssistantMessage)
pub fn answer_committed(&self, message: AssistantMessage)
An assistant answer committed by the runtime (or recovered from it): the agent loop’s message_end, then the
start of each call of its tool round.
Sourcepub fn resume_round(
&self,
calls: Vec<(String, String)>,
done: Vec<(String, AgentToolResult, bool)>,
)
pub fn resume_round( &self, calls: Vec<(String, String)>, done: Vec<(String, AgentToolResult, bool)>, )
The start of a tool round whose calls already started before a restart (no new start events).
Sourcepub fn result_committed(&self, message: &Value)
pub fn result_committed(&self, message: &Value)
A cell result committed by the runtime: the agent loop’s tool_execution_end, and once every call of the
round has one, the result messages in call order.
Auto Trait Implementations§
impl !Freeze for Bridge
impl !RefUnwindSafe for Bridge
impl !UnwindSafe for Bridge
impl Forget for Bridge
impl Move for Bridge
impl Send for Bridge
impl Sync for Bridge
impl Unpin for Bridge
impl UnsafeUnpin for Bridge
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