Documentation ¶
Overview ¶
internal/providers/anthropic.go
internal/providers/copilot.go
internal/providers/factory.go
internal/providers/groq.go
internal/providers/ollama.go
internal/providers/provider.go
internal/providers/stream.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnthropicProvider ¶
type AnthropicProvider struct {
// contains filtered or unexported fields
}
func NewAnthropicProvider ¶
func NewAnthropicProvider(apiKey, model string) *AnthropicProvider
NewAnthropicProvider creates a new Anthropic provider model should be one of: claude-3-opus-20240229, claude-3-sonnet-20240229, claude-3-haiku-20240307
func (*AnthropicProvider) Complete ¶
func (p *AnthropicProvider) Complete(ctx context.Context, prompt string, stream bool) (io.ReadCloser, error)
func (*AnthropicProvider) Name ¶
func (p *AnthropicProvider) Name() string
type CopilotProvider ¶
type CopilotProvider struct {
// contains filtered or unexported fields
}
func NewCopilotProvider ¶
func NewCopilotProvider(token string, model string) (*CopilotProvider, error)
func (*CopilotProvider) Complete ¶
func (p *CopilotProvider) Complete(ctx context.Context, prompt string, stream bool) (io.ReadCloser, error)
func (*CopilotProvider) Name ¶
func (p *CopilotProvider) Name() string
type GeminiProvider ¶
type GeminiProvider struct {
// contains filtered or unexported fields
}
func NewGeminiProvider ¶
func NewGeminiProvider(apiKey, model string) (*GeminiProvider, error)
func (*GeminiProvider) Complete ¶
func (p *GeminiProvider) Complete(ctx context.Context, prompt string, stream bool) (io.ReadCloser, error)
func (*GeminiProvider) Name ¶
func (p *GeminiProvider) Name() string
type GroqProvider ¶
type GroqProvider struct {
// contains filtered or unexported fields
}
func NewGroqProvider ¶
func NewGroqProvider(apiKey, model string) *GroqProvider
func (*GroqProvider) Complete ¶
func (p *GroqProvider) Complete(ctx context.Context, prompt string, stream bool) (io.ReadCloser, error)
func (*GroqProvider) Name ¶
func (p *GroqProvider) Name() string
type OllamaProvider ¶
type OllamaProvider struct {
// contains filtered or unexported fields
}
func NewOllamaProvider ¶
func NewOllamaProvider(host, model string) *OllamaProvider
func (*OllamaProvider) Complete ¶
func (p *OllamaProvider) Complete(ctx context.Context, prompt string, stream bool) (io.ReadCloser, error)
func (*OllamaProvider) Name ¶
func (p *OllamaProvider) Name() string
type OpenAIProvider ¶
type OpenAIProvider struct {
// contains filtered or unexported fields
}
func NewOpenAIProvider ¶
func NewOpenAIProvider(apiKey string, model string) (*OpenAIProvider, error)
func (*OpenAIProvider) Complete ¶
func (p *OpenAIProvider) Complete(ctx context.Context, prompt string, stream bool) (io.ReadCloser, error)
func (*OpenAIProvider) Name ¶
func (p *OpenAIProvider) Name() string
Click to show internal directories.
Click to hide internal directories.