Documentation
¶
Index ¶
- Constants
- func NormalizeKiroToolSchema(schema interface{}) interface{}
- type Account
- type DeviceAuthResponse
- type DevicePollResult
- type Provider
- func (p *Provider) Accounts() []*Account
- func (p *Provider) ChatCompletion(ctx context.Context, req *providers.ChatRequest) (io.ReadCloser, bool, int, error)
- func (p *Provider) Embeddings(ctx context.Context, req *providers.EmbeddingRequest) (*providers.EmbeddingResponse, error)
- func (p *Provider) ID() string
- func (p *Provider) IsHealthy() bool
- func (p *Provider) Models(ctx context.Context) ([]providers.ModelInfo, error)
- func (p *Provider) SetStrategy(s string)
- func (p *Provider) TestAccount(ctx context.Context, accountID string) error
- func (p *Provider) TestConnection(ctx context.Context) error
- func (p *Provider) Type() string
Constants ¶
const ( DefaultSocialClientID = "kiro-cli" SocialDeviceAuthURL = "https://prod.us-east-1.auth.desktop.kiro.dev/oauth/device/authorization" SocialDevicePollURL = "https://prod.us-east-1.auth.desktop.kiro.dev/oauth/device/poll" )
Variables ¶
This section is empty.
Functions ¶
func NormalizeKiroToolSchema ¶
func NormalizeKiroToolSchema(schema interface{}) interface{}
NormalizeKiroToolSchema recursively cleans schema for Kiro API: - Removes additionalProperties (Kiro rejects it) - Removes empty required array (Kiro rejects required: [])
Types ¶
type Account ¶
type DeviceAuthResponse ¶ added in v0.5.0
type DeviceAuthResponse struct {
AuthURL string `json:"authUrl"`
DeviceCode string `json:"deviceCode"`
UserCode string `json:"userCode"`
ExpiresIn int `json:"expiresIn"`
Interval int `json:"interval"`
Provider string `json:"provider"`
}
DeviceAuthResponse holds the user verification code and link
func StartSocialDeviceAuth ¶ added in v0.5.0
func StartSocialDeviceAuth(ctx context.Context, provider string) (*DeviceAuthResponse, error)
StartSocialDeviceAuth initiates the device authorization flow with Google or GitHub
type DevicePollResult ¶ added in v0.5.0
type DevicePollResult struct {
Success bool `json:"success"`
Pending bool `json:"pending"`
AccessToken string `json:"accessToken,omitempty"`
RefreshToken string `json:"refreshToken,omitempty"`
ProfileARN string `json:"profileArn,omitempty"`
Email string `json:"email,omitempty"`
Error string `json:"error,omitempty"`
}
DevicePollResult holds the polling status from AWS Kiro
func PollSocialDeviceAuth ¶ added in v0.5.0
func PollSocialDeviceAuth(ctx context.Context, deviceCode string) (*DevicePollResult, error)
PollSocialDeviceAuth polls AWS Kiro for credentials
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
func NewProviderWithAccounts ¶
func (*Provider) ChatCompletion ¶
func (p *Provider) ChatCompletion(ctx context.Context, req *providers.ChatRequest) (io.ReadCloser, bool, int, error)
func (*Provider) Embeddings ¶
func (p *Provider) Embeddings(ctx context.Context, req *providers.EmbeddingRequest) (*providers.EmbeddingResponse, error)