pub struct Threads<'a>(/* private fields */);Expand description
Conversations.
Implementations§
Source§impl Threads<'_>
impl Threads<'_>
pub fn list(&self, bot_id: Option<&str>) -> Result<Vec<ChatThread>>
pub fn create(&self, bot_id: &str, title: Option<&str>) -> Result<ChatThread>
Sourcepub fn send(
&self,
thread_id: &str,
text: &str,
wait: bool,
) -> Result<SendResult>
pub fn send( &self, thread_id: &str, text: &str, wait: bool, ) -> Result<SendResult>
Sends a message; with wait the call returns after the bot finished (10 minute limit).
pub fn send_with_timeout( &self, thread_id: &str, text: &str, wait: bool, timeout_seconds: u32, ) -> Result<SendResult>
pub fn messages(&self, thread_id: &str) -> Result<Vec<ChatMessage>>
pub fn files(&self, thread_id: &str) -> Result<Vec<WorkspaceFile>>
pub fn download(&self, thread_id: &str, path: &str) -> Result<Vec<u8>>
pub fn delete(&self, thread_id: &str) -> Result<()>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Threads<'a>
impl<'a> !UnwindSafe for Threads<'a>
impl<'a> Freeze for Threads<'a>
impl<'a> Send for Threads<'a>
impl<'a> Sync for Threads<'a>
impl<'a> Unpin for Threads<'a>
impl<'a> UnsafeUnpin for Threads<'a>
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