pub struct RuntimeSessionLifecycle<A: RuntimeHostAdapter> { /* private fields */ }Expand description
Shared lifecycle helper for runtime-backed hosts.
Implementations§
Source§impl<A: RuntimeHostAdapter> RuntimeSessionLifecycle<A>
impl<A: RuntimeHostAdapter> RuntimeSessionLifecycle<A>
pub fn new(adapter: A, org_id: i64, session_id: SessionId) -> Self
pub async fn turn_started(&self, turn_id: TurnId, input_message_id: MessageId)
pub async fn emit_turn_completed( &self, turn_id: TurnId, input_message_id: MessageId, iterations: u32, usage: Option<TokenUsage>, input_content: Option<String>, )
pub async fn emit_session_idled( &self, turn_id: TurnId, input_message_id: MessageId, iterations: Option<u32>, usage: Option<TokenUsage>, )
pub async fn turn_completed( &self, turn_id: TurnId, input_message_id: MessageId, iterations: u32, usage: Option<TokenUsage>, input_content: Option<String>, )
pub async fn turn_failed( &self, turn_id: TurnId, input_message_id: MessageId, error: &str, user_error: Option<&UserFacingError>, )
pub async fn waiting_for_tool_results(&self)
pub async fn dependency_blocked( &self, turn_id: TurnId, input_message_id: MessageId, blocker: DependencyBlocker, )
Auto Trait Implementations§
impl<A> Freeze for RuntimeSessionLifecycle<A>where
A: Freeze,
impl<A> RefUnwindSafe for RuntimeSessionLifecycle<A>where
A: RefUnwindSafe,
impl<A> Send for RuntimeSessionLifecycle<A>
impl<A> Sync for RuntimeSessionLifecycle<A>
impl<A> Unpin for RuntimeSessionLifecycle<A>where
A: Unpin,
impl<A> UnsafeUnpin for RuntimeSessionLifecycle<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for RuntimeSessionLifecycle<A>where
A: UnwindSafe,
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request