Documentation
¶
Index ¶
- func AuthFilePathIn(workspace, runtimeDir string) (string, error)
- func HasTokenIn(workspace, runtimeDir, provider string) (bool, error)
- func NewChatGPTClientIn(workspace, runtimeDir, provider string, logger *slog.Logger, ...) (*openai.Client, error)
- func RemoveTokenIn(workspace, runtimeDir, provider string) error
- func SaveTokenIn(workspace, runtimeDir, provider string, token Token) error
- func WithResponseObserver(ctx context.Context, observer ResponseObserver) context.Context
- type InertResponseObserver
- type MissingTokenError
- type ResponseObserver
- type Token
- func AcquireBrowserToken(ctx context.Context, out io.Writer) (Token, error)
- func AcquireDeviceToken(ctx context.Context, out io.Writer) (Token, error)
- func FreshTokenIn(ctx context.Context, workspace, runtimeDir, provider string, rejected Token) (Token, error)
- func LoadTokenIn(workspace, runtimeDir, provider string) (Token, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthFilePathIn ¶
func HasTokenIn ¶ added in v0.0.42
func NewChatGPTClientIn ¶
func RemoveTokenIn ¶ added in v0.0.42
func SaveTokenIn ¶
func WithResponseObserver ¶ added in v0.2.32
func WithResponseObserver(ctx context.Context, observer ResponseObserver) context.Context
Types ¶
type InertResponseObserver ¶ added in v0.2.33
type InertResponseObserver struct{}
func (InertResponseObserver) BeginResponse ¶ added in v0.2.33
func (InertResponseObserver) BeginResponse(context.Context) error
func (InertResponseObserver) ObserveResponse ¶ added in v0.2.33
func (InertResponseObserver) ObserveResponse(context.Context, *responses.ResponseStreamEventUnion) error
type MissingTokenError ¶ added in v0.1.30
type MissingTokenError struct {
Provider string
}
func (*MissingTokenError) Error ¶ added in v0.1.30
func (e *MissingTokenError) Error() string
func (*MissingTokenError) Unwrap ¶ added in v0.1.30
func (e *MissingTokenError) Unwrap() error
type ResponseObserver ¶ added in v0.2.32
type Token ¶
type Token struct {
Refresh string `json:"refresh"`
Access string `json:"access"`
Expires int64 `json:"expires"`
AccountID string `json:"account_id,omitempty"`
}
func AcquireBrowserToken ¶ added in v0.0.42
func AcquireDeviceToken ¶ added in v0.0.42
func FreshTokenIn ¶ added in v0.1.30
func LoadTokenIn ¶
Click to show internal directories.
Click to hide internal directories.