Documentation
¶
Index ¶
- func CopilotAvailableModelIDs(credential *auth.Credential) ([]string, bool)
- func GeneratePKCE(random io.Reader) (verifier, challenge string, err error)
- func GitHubCopilotBaseURL(token, enterpriseDomain string) string
- func OAuthErrorHTML(message, details string) string
- func OAuthSuccessHTML(message string) string
- func OpenAICodexAccountID(token string) string
- type Anthropic
- func (flow *Anthropic) Login(ctx context.Context, interaction auth.AuthInteraction) (*auth.Credential, error)
- func (*Anthropic) Name() string
- func (flow *Anthropic) Refresh(ctx context.Context, credential *auth.Credential) (*auth.Credential, error)
- func (*Anthropic) ToAuth(credential *auth.Credential) (auth.ModelAuth, error)
- type AnthropicOptions
- type GitHubCopilot
- func (flow *GitHubCopilot) Login(ctx context.Context, interaction auth.AuthInteraction) (*auth.Credential, error)
- func (*GitHubCopilot) Name() string
- func (flow *GitHubCopilot) Refresh(ctx context.Context, credential *auth.Credential) (*auth.Credential, error)
- func (*GitHubCopilot) ToAuth(credential *auth.Credential) (auth.ModelAuth, error)
- type GitHubCopilotOptions
- type KimiCoding
- func (flow *KimiCoding) Login(ctx context.Context, interaction auth.AuthInteraction) (*auth.Credential, error)
- func (*KimiCoding) LoginLabel() string
- func (*KimiCoding) Name() string
- func (flow *KimiCoding) Refresh(ctx context.Context, credential *auth.Credential) (*auth.Credential, error)
- func (*KimiCoding) ToAuth(credential *auth.Credential) (auth.ModelAuth, error)
- type KimiCodingOptions
- type OpenAICodex
- func (flow *OpenAICodex) Login(ctx context.Context, interaction auth.AuthInteraction) (*auth.Credential, error)
- func (*OpenAICodex) Name() string
- func (flow *OpenAICodex) Refresh(ctx context.Context, credential *auth.Credential) (*auth.Credential, error)
- func (*OpenAICodex) ToAuth(credential *auth.Credential) (auth.ModelAuth, error)
- type OpenAICodexOptions
- type OpenRouter
- func (flow *OpenRouter) Login(ctx context.Context, interaction auth.AuthInteraction) (*auth.Credential, error)
- func (*OpenRouter) LoginLabel() string
- func (*OpenRouter) Name() string
- func (*OpenRouter) Refresh(_ context.Context, credential *auth.Credential) (*auth.Credential, error)
- func (*OpenRouter) ToAuth(credential *auth.Credential) (auth.ModelAuth, error)
- type OpenRouterOptions
- type XAI
- func (flow *XAI) Login(ctx context.Context, interaction auth.AuthInteraction) (*auth.Credential, error)
- func (*XAI) LoginLabel() string
- func (*XAI) Name() string
- func (flow *XAI) Refresh(ctx context.Context, credential *auth.Credential) (*auth.Credential, error)
- func (*XAI) ToAuth(credential *auth.Credential) (auth.ModelAuth, error)
- type XAIOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopilotAvailableModelIDs ¶
func CopilotAvailableModelIDs(credential *auth.Credential) ([]string, bool)
func GitHubCopilotBaseURL ¶
func OAuthErrorHTML ¶
func OAuthSuccessHTML ¶
func OpenAICodexAccountID ¶
Types ¶
type Anthropic ¶
type Anthropic struct {
// contains filtered or unexported fields
}
func NewAnthropic ¶
func NewAnthropic(options *AnthropicOptions) *Anthropic
func (*Anthropic) Login ¶
func (flow *Anthropic) Login(ctx context.Context, interaction auth.AuthInteraction) (*auth.Credential, error)
func (*Anthropic) Refresh ¶
func (flow *Anthropic) Refresh(ctx context.Context, credential *auth.Credential) (*auth.Credential, error)
type AnthropicOptions ¶
type GitHubCopilot ¶
type GitHubCopilot struct {
// contains filtered or unexported fields
}
func NewGitHubCopilot ¶
func NewGitHubCopilot(options *GitHubCopilotOptions) *GitHubCopilot
func (*GitHubCopilot) Login ¶
func (flow *GitHubCopilot) Login(ctx context.Context, interaction auth.AuthInteraction) (*auth.Credential, error)
func (*GitHubCopilot) Name ¶
func (*GitHubCopilot) Name() string
func (*GitHubCopilot) Refresh ¶
func (flow *GitHubCopilot) Refresh(ctx context.Context, credential *auth.Credential) (*auth.Credential, error)
func (*GitHubCopilot) ToAuth ¶
func (*GitHubCopilot) ToAuth(credential *auth.Credential) (auth.ModelAuth, error)
type GitHubCopilotOptions ¶
type KimiCoding ¶
type KimiCoding struct {
// contains filtered or unexported fields
}
func NewKimiCoding ¶
func NewKimiCoding(options *KimiCodingOptions) *KimiCoding
func (*KimiCoding) Login ¶
func (flow *KimiCoding) Login(ctx context.Context, interaction auth.AuthInteraction) (*auth.Credential, error)
func (*KimiCoding) LoginLabel ¶
func (*KimiCoding) LoginLabel() string
func (*KimiCoding) Name ¶
func (*KimiCoding) Name() string
func (*KimiCoding) Refresh ¶
func (flow *KimiCoding) Refresh(ctx context.Context, credential *auth.Credential) (*auth.Credential, error)
func (*KimiCoding) ToAuth ¶
func (*KimiCoding) ToAuth(credential *auth.Credential) (auth.ModelAuth, error)
type KimiCodingOptions ¶
type OpenAICodex ¶
type OpenAICodex struct {
// contains filtered or unexported fields
}
func NewOpenAICodex ¶
func NewOpenAICodex(options *OpenAICodexOptions) *OpenAICodex
func (*OpenAICodex) Login ¶
func (flow *OpenAICodex) Login(ctx context.Context, interaction auth.AuthInteraction) (*auth.Credential, error)
func (*OpenAICodex) Name ¶
func (*OpenAICodex) Name() string
func (*OpenAICodex) Refresh ¶
func (flow *OpenAICodex) Refresh(ctx context.Context, credential *auth.Credential) (*auth.Credential, error)
func (*OpenAICodex) ToAuth ¶
func (*OpenAICodex) ToAuth(credential *auth.Credential) (auth.ModelAuth, error)
type OpenAICodexOptions ¶
type OpenAICodexOptions struct {
AuthorizeURL string
TokenURL string
DeviceUserCodeURL string
DeviceTokenURL string
DeviceVerificationURI string
RedirectURI string
DeviceRedirectURI string
CallbackHost string
CallbackPort int
HTTPClient *http.Client
Random io.Reader
Now func() time.Time
Listen func(network, address string) (net.Listener, error)
}
type OpenRouter ¶
type OpenRouter struct {
// contains filtered or unexported fields
}
func NewOpenRouter ¶
func NewOpenRouter(options *OpenRouterOptions) *OpenRouter
func (*OpenRouter) Login ¶
func (flow *OpenRouter) Login(ctx context.Context, interaction auth.AuthInteraction) (*auth.Credential, error)
func (*OpenRouter) LoginLabel ¶
func (*OpenRouter) LoginLabel() string
func (*OpenRouter) Name ¶
func (*OpenRouter) Name() string
func (*OpenRouter) Refresh ¶
func (*OpenRouter) Refresh(_ context.Context, credential *auth.Credential) (*auth.Credential, error)
Refresh is a no-op: the OAuth flow mints a permanent API key.
func (*OpenRouter) ToAuth ¶
func (*OpenRouter) ToAuth(credential *auth.Credential) (auth.ModelAuth, error)
type OpenRouterOptions ¶
type XAI ¶
type XAI struct {
// contains filtered or unexported fields
}
func NewXAI ¶
func NewXAI(options *XAIOptions) *XAI
func (*XAI) Login ¶
func (flow *XAI) Login(ctx context.Context, interaction auth.AuthInteraction) (*auth.Credential, error)
func (*XAI) LoginLabel ¶
func (*XAI) Refresh ¶
func (flow *XAI) Refresh(ctx context.Context, credential *auth.Credential) (*auth.Credential, error)
Click to show internal directories.
Click to hide internal directories.