pub struct CodexConfiguration {
pub alias_name: String,
pub auth_mode: String,
pub openai_api_key: Option<String>,
pub id_token: Option<String>,
pub access_token: Option<String>,
pub refresh_token: Option<String>,
pub account_id: Option<String>,
pub last_refresh: Option<String>,
}Expand description
CodexConfiguration represents a Codex (OpenAI) API configuration
Supports two authentication modes:
- “chatgpt”: Uses OAuth tokens (id_token, access_token, refresh_token, account_id)
- “apikey”: Uses a direct OpenAI API key
Fields§
§alias_name: StringUnique alias name for this configuration
auth_mode: StringAuthentication mode: “chatgpt” or “apikey”
openai_api_key: Option<String>OpenAI API key (apikey mode)
id_token: Option<String>OAuth ID token (chatgpt mode)
access_token: Option<String>OAuth access token (chatgpt mode)
refresh_token: Option<String>OAuth refresh token (chatgpt mode)
account_id: Option<String>Account ID (chatgpt mode)
last_refresh: Option<String>Last token refresh timestamp (chatgpt mode)
Trait Implementations§
Source§impl Clone for CodexConfiguration
impl Clone for CodexConfiguration
Source§fn clone(&self) -> CodexConfiguration
fn clone(&self) -> CodexConfiguration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CodexConfiguration
impl Debug for CodexConfiguration
Source§impl<'de> Deserialize<'de> for CodexConfiguration
impl<'de> Deserialize<'de> for CodexConfiguration
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CodexConfiguration
impl PartialEq for CodexConfiguration
Source§fn eq(&self, other: &CodexConfiguration) -> bool
fn eq(&self, other: &CodexConfiguration) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CodexConfiguration
impl Serialize for CodexConfiguration
impl StructuralPartialEq for CodexConfiguration
Auto Trait Implementations§
impl Freeze for CodexConfiguration
impl RefUnwindSafe for CodexConfiguration
impl Send for CodexConfiguration
impl Sync for CodexConfiguration
impl Unpin for CodexConfiguration
impl UnsafeUnpin for CodexConfiguration
impl UnwindSafe for CodexConfiguration
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