pub struct Thread { /* private fields */ }Implementations§
Source§impl Thread
impl Thread
pub fn id(&self) -> Option<&str>
pub async fn set_name( &mut self, name: impl Into<String>, ) -> Result<ThreadSetNameResult, ClientError>
pub async fn read( &mut self, include_turns: Option<bool>, ) -> Result<ThreadReadResult, ClientError>
pub async fn archive(&mut self) -> Result<ThreadArchiveResult, ClientError>
pub async fn unarchive(&mut self) -> Result<ThreadUnarchiveResult, ClientError>
pub async fn rollback( &mut self, count: u32, ) -> Result<ThreadRollbackResult, ClientError>
pub async fn compact_start( &mut self, ) -> Result<ThreadCompactStartResult, ClientError>
pub async fn steer( &mut self, input: impl Into<Input>, expected_turn_id: Option<String>, ) -> Result<TurnSteerResult, ClientError>
pub async fn interrupt( &mut self, turn_id: impl Into<String>, ) -> Result<(), ClientError>
pub async fn run_streamed( &mut self, input: impl Into<Input>, turn_options: TurnOptions, ) -> Result<StreamedTurn, ClientError>
pub async fn run( &mut self, input: impl Into<Input>, turn_options: TurnOptions, ) -> Result<Turn, ThreadRunError>
Sourcepub async fn ask(
&mut self,
input: impl Into<Input>,
turn_options: TurnOptions,
) -> Result<String, ThreadRunError>
pub async fn ask( &mut self, input: impl Into<Input>, turn_options: TurnOptions, ) -> Result<String, ThreadRunError>
Runs one turn on this thread and returns only the final agent response text.
Auto Trait Implementations§
impl Freeze for Thread
impl !RefUnwindSafe for Thread
impl Send for Thread
impl Sync for Thread
impl Unpin for Thread
impl UnsafeUnpin for Thread
impl !UnwindSafe for Thread
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