Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCodexToken ¶
GetCodexToken is a convenience wrapper that returns just the token. Deprecated: Use GetCodexCredentials instead to get both token and account ID.
func GetGeminiCredentials ¶
GetGeminiCredentials returns an error explaining how to configure Gemini. Kept for backwards compatibility with the old error message.
Types ¶
type CodexCredentials ¶
CodexCredentials holds the token and optional account ID for Codex auth
func GetCodexCredentials ¶
func GetCodexCredentials() (*CodexCredentials, error)
GetCodexCredentials retrieves the OpenAI credentials from Codex auth. It reads from ~/.codex/auth.json and returns the OAuth access_token along with the account_id (needed for ChatGPT backend API).
type GeminiOAuthCredentials ¶
type GeminiOAuthCredentials struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
ExpiryDate int64 `json:"expiry_date"`
}
GeminiOAuthCredentials holds the OAuth credentials loaded from ~/.gemini/oauth_creds.json
func GetGeminiOAuthCredentials ¶
func GetGeminiOAuthCredentials() (*GeminiOAuthCredentials, error)
GetGeminiOAuthCredentials loads OAuth credentials from ~/.gemini/oauth_creds.json These are used for the Code Assist API (cloudcode-pa.googleapis.com)