pub struct AsyncCodex { /* private fields */ }Expand description
Asynchronous Codex client mirroring Python’s AsyncCodex.
Implementations§
Source§impl AsyncCodex
impl AsyncCodex
pub fn new(config: CodexConfig) -> Self
pub fn with_defaults() -> Self
pub async fn connect(config: CodexConfig) -> Result<Self>
Sourcepub async fn start(&self) -> Result<()>
pub async fn start(&self) -> Result<()>
Start the process and complete the initialize handshake.
pub fn metadata(&self) -> Result<InitializeResponse>
pub async fn close(&self) -> Result<()>
pub async fn login_api_key(&self, api_key: impl Into<String>) -> Result<()>
pub async fn login_chatgpt(&self) -> Result<AsyncChatgptLoginHandle>
pub async fn login_chatgpt_device_code( &self, ) -> Result<AsyncDeviceCodeLoginHandle>
pub async fn account(&self) -> Result<GetAccountResponse>
pub async fn account_with_refresh( &self, refresh_token: bool, ) -> Result<GetAccountResponse>
pub async fn logout(&self) -> Result<()>
pub async fn thread_start(&self) -> Result<AsyncThread>
pub async fn thread_start_with( &self, options: &ThreadStartOptions, ) -> Result<AsyncThread>
pub async fn thread_list(&self) -> Result<ThreadListResponse>
pub async fn thread_list_with( &self, options: &ThreadListOptions, ) -> Result<ThreadListResponse>
pub async fn thread_resume( &self, thread_id: impl Into<String>, ) -> Result<AsyncThread>
pub async fn thread_resume_with( &self, thread_id: impl Into<String>, options: &ThreadResumeOptions, ) -> Result<AsyncThread>
pub async fn thread_fork( &self, thread_id: impl Into<String>, ) -> Result<AsyncThread>
pub async fn thread_fork_with( &self, thread_id: impl Into<String>, options: &ThreadForkOptions, ) -> Result<AsyncThread>
pub async fn thread_archive( &self, thread_id: impl Into<String>, ) -> Result<ThreadArchiveResponse>
pub async fn thread_unarchive( &self, thread_id: impl Into<String>, ) -> Result<AsyncThread>
pub async fn models(&self) -> Result<ModelListResponse>
pub async fn next_notification(&self) -> Result<Notification>
Trait Implementations§
Source§impl Clone for AsyncCodex
impl Clone for AsyncCodex
Source§impl Debug for AsyncCodex
impl Debug for AsyncCodex
Auto Trait Implementations§
impl !RefUnwindSafe for AsyncCodex
impl !UnwindSafe for AsyncCodex
impl Freeze for AsyncCodex
impl Send for AsyncCodex
impl Sync for AsyncCodex
impl Unpin for AsyncCodex
impl UnsafeUnpin for AsyncCodex
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