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