Documentation
¶
Index ¶
- type Account
- type Provider
- 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) Execute(ctx context.Context, req *providers.ChatRequest) (io.ReadCloser, bool, int, error)
- func (p *Provider) ID() string
- func (p *Provider) IsHealthy() bool
- func (p *Provider) Models(ctx context.Context) ([]providers.ModelInfo, error)
- func (p *Provider) TestAccount(ctx context.Context, accID string) (bool, string, int64, error)
- func (p *Provider) TestConnection(ctx context.Context) error
- func (p *Provider) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
ID string `json:"id"`
Email string `json:"email,omitempty"`
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token,omitempty"`
WorkOSID string `json:"workos_id,omitempty"`
ExpiresAt time.Time `json:"expires_at,omitempty"`
// contains filtered or unexported fields
}
func AutoImportCursor ¶
AutoImportCursor detects and imports Cursor credentials from ~/.config/cursor/auth.json
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
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)
func (*Provider) Execute ¶
func (p *Provider) Execute(ctx context.Context, req *providers.ChatRequest) (io.ReadCloser, bool, int, error)
func (*Provider) TestAccount ¶
TestAccount checks connection against Cursor API
Click to show internal directories.
Click to hide internal directories.