pub struct SessionInference { /* private fields */ }Expand description
An active host-independent primary provider inference.
The handle owns the native provider turn but no session, host, or application chat state.
Implementations§
Source§impl SessionInference
impl SessionInference
Sourcepub async fn next_event(&mut self) -> Result<Option<SessionInferenceEvent>>
pub async fn next_event(&mut self) -> Result<Option<SessionInferenceEvent>>
Returns the next normalized semantic provider event.
Raw provider transport-input events are skipped. Returning
SessionInferenceEvent::Completed terminalizes the handle.
Sourcepub async fn respond(&mut self, call_id: &str, result: ToolResult) -> Result<()>
pub async fn respond(&mut self, call_id: &str, result: ToolResult) -> Result<()>
Sends exactly one native result for a previously surfaced tool call.
A native response failure leaves the handle active so interrupted-call
accounting remains available through Self::finish_unavailable.
Accounts for an interrupted active inference and terminalizes the handle.
Auto Trait Implementations§
impl Freeze for SessionInference
impl RefUnwindSafe for SessionInference
impl Send for SessionInference
impl Sync for SessionInference
impl Unpin for SessionInference
impl UnsafeUnpin for SessionInference
impl UnwindSafe for SessionInference
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