Documentation ¶
Index ¶
- type AnthropicProvider
- func (a *AnthropicProvider) Configure(apiKey string) error
- func (a *AnthropicProvider) GetConfig() ModelConfig
- func (a *AnthropicProvider) Name() string
- func (a *AnthropicProvider) SendPrompt(modelName string, prompt string) (string, error)
- func (a *AnthropicProvider) SendPromptWithFile(modelName string, prompt string, file FileInput) (string, error)
- func (a *AnthropicProvider) SetConfig(config ModelConfig)
- func (a *AnthropicProvider) SetVerbose(verbose bool)
- func (a *AnthropicProvider) SupportsModel(modelName string) bool
- func (a *AnthropicProvider) ValidateModel(modelName string) bool
- type DetectProviderFunc
- type FileInput
- type GoogleProvider
- func (g *GoogleProvider) Configure(apiKey string) error
- func (g *GoogleProvider) Name() string
- func (g *GoogleProvider) SendPrompt(modelName string, prompt string) (string, error)
- func (g *GoogleProvider) SendPromptWithFile(modelName string, prompt string, file FileInput) (string, error)
- func (g *GoogleProvider) SetVerbose(verbose bool)
- func (g *GoogleProvider) SupportsModel(modelName string) bool
- func (g *GoogleProvider) ValidateModel(modelName string) bool
- type ModelConfig
- type OllamaProvider
- func (o *OllamaProvider) Configure(apiKey string) error
- func (o *OllamaProvider) Name() string
- func (o *OllamaProvider) SendPrompt(modelName string, prompt string) (string, error)
- func (o *OllamaProvider) SendPromptWithFile(modelName string, prompt string, file FileInput) (string, error)
- func (o *OllamaProvider) SetVerbose(verbose bool)
- func (o *OllamaProvider) SupportsModel(modelName string) bool
- type OllamaRequest
- type OllamaResponse
- type OpenAIProvider
- func (o *OpenAIProvider) Configure(apiKey string) error
- func (o *OpenAIProvider) GetConfig() ModelConfig
- func (o *OpenAIProvider) Name() string
- func (o *OpenAIProvider) SendPrompt(modelName string, prompt string) (string, error)
- func (o *OpenAIProvider) SendPromptWithFile(modelName string, prompt string, file FileInput) (string, error)
- func (o *OpenAIProvider) SetConfig(config ModelConfig)
- func (o *OpenAIProvider) SetVerbose(verbose bool)
- func (o *OpenAIProvider) SupportsModel(modelName string) bool
- func (o *OpenAIProvider) ValidateModel(modelName string) bool
- type Provider
- type XAIProvider
- func (x *XAIProvider) Configure(apiKey string) error
- func (x *XAIProvider) GetConfig() ModelConfig
- func (x *XAIProvider) Name() string
- func (x *XAIProvider) SendPrompt(modelName string, prompt string) (string, error)
- func (x *XAIProvider) SendPromptWithFile(modelName string, prompt string, file FileInput) (string, error)
- func (x *XAIProvider) SetConfig(config ModelConfig)
- func (x *XAIProvider) SetVerbose(verbose bool)
- func (x *XAIProvider) SupportsModel(modelName string) bool
- func (x *XAIProvider) ValidateModel(modelName string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnthropicProvider ¶
type AnthropicProvider struct {
// contains filtered or unexported fields
}
AnthropicProvider handles Anthropic family of models
func NewAnthropicProvider ¶
func NewAnthropicProvider() *AnthropicProvider
NewAnthropicProvider creates a new Anthropic provider instance
func (*AnthropicProvider) Configure ¶
func (a *AnthropicProvider) Configure(apiKey string) error
Configure sets up the provider with necessary credentials
func (*AnthropicProvider) GetConfig ¶
func (a *AnthropicProvider) GetConfig() ModelConfig
GetConfig returns the current provider configuration
func (*AnthropicProvider) Name ¶
func (a *AnthropicProvider) Name() string
Name returns the provider name
func (*AnthropicProvider) SendPrompt ¶
func (a *AnthropicProvider) SendPrompt(modelName string, prompt string) (string, error)
SendPrompt sends a prompt to the specified model and returns the response
func (*AnthropicProvider) SendPromptWithFile ¶
func (a *AnthropicProvider) SendPromptWithFile(modelName string, prompt string, file FileInput) (string, error)
SendPromptWithFile sends a prompt along with a file to the specified model and returns the response
func (*AnthropicProvider) SetConfig ¶
func (a *AnthropicProvider) SetConfig(config ModelConfig)
SetConfig updates the provider configuration
func (*AnthropicProvider) SetVerbose ¶
func (a *AnthropicProvider) SetVerbose(verbose bool)
SetVerbose enables or disables verbose mode
func (*AnthropicProvider) SupportsModel ¶
func (a *AnthropicProvider) SupportsModel(modelName string) bool
SupportsModel checks if the given model name is supported by Anthropic
func (*AnthropicProvider) ValidateModel ¶
func (a *AnthropicProvider) ValidateModel(modelName string) bool
ValidateModel checks if the specific Anthropic model variant is valid
type DetectProviderFunc ¶
DetectProviderFunc is the type for the provider detection function
var DetectProvider DetectProviderFunc = defaultDetectProvider
DetectProvider determines the appropriate provider based on the model name
type GoogleProvider ¶
type GoogleProvider struct {
// contains filtered or unexported fields
}
GoogleProvider handles Google AI (Gemini) family of models
func NewGoogleProvider ¶
func NewGoogleProvider() *GoogleProvider
NewGoogleProvider creates a new Google provider instance
func (*GoogleProvider) Configure ¶
func (g *GoogleProvider) Configure(apiKey string) error
Configure sets up the provider with necessary credentials
func (*GoogleProvider) SendPrompt ¶
func (g *GoogleProvider) SendPrompt(modelName string, prompt string) (string, error)
SendPrompt sends a prompt to the specified model and returns the response
func (*GoogleProvider) SendPromptWithFile ¶
func (g *GoogleProvider) SendPromptWithFile(modelName string, prompt string, file FileInput) (string, error)
SendPromptWithFile sends a prompt along with a file to the specified model and returns the response
func (*GoogleProvider) SetVerbose ¶
func (g *GoogleProvider) SetVerbose(verbose bool)
SetVerbose enables or disables verbose mode
func (*GoogleProvider) SupportsModel ¶
func (g *GoogleProvider) SupportsModel(modelName string) bool
SupportsModel checks if the given model name is supported by Google
func (*GoogleProvider) ValidateModel ¶
func (g *GoogleProvider) ValidateModel(modelName string) bool
ValidateModel checks if the specific Google model variant is valid
type ModelConfig ¶
ModelConfig represents configuration options for model calls
type OllamaProvider ¶
type OllamaProvider struct {
// contains filtered or unexported fields
}
OllamaProvider handles Ollama family of models
func NewOllamaProvider ¶
func NewOllamaProvider() *OllamaProvider
NewOllamaProvider creates a new Ollama provider instance
func (*OllamaProvider) Configure ¶
func (o *OllamaProvider) Configure(apiKey string) error
Configure sets up the provider (no API key needed for Ollama)
func (*OllamaProvider) SendPrompt ¶
func (o *OllamaProvider) SendPrompt(modelName string, prompt string) (string, error)
SendPrompt sends a prompt to the specified model and returns the response
func (*OllamaProvider) SendPromptWithFile ¶
func (o *OllamaProvider) SendPromptWithFile(modelName string, prompt string, file FileInput) (string, error)
SendPromptWithFile sends a prompt along with a file to the specified model and returns the response
func (*OllamaProvider) SetVerbose ¶
func (o *OllamaProvider) SetVerbose(verbose bool)
SetVerbose enables or disables verbose mode
func (*OllamaProvider) SupportsModel ¶
func (o *OllamaProvider) SupportsModel(modelName string) bool
SupportsModel checks if the given model name is supported by Ollama
type OllamaRequest ¶
type OllamaRequest struct { Model string `json:"model"` Prompt string `json:"prompt"` Stream bool `json:"stream"` }
OllamaRequest represents the request structure for Ollama API
type OllamaResponse ¶
OllamaResponse represents the response structure from Ollama API
type OpenAIProvider ¶
type OpenAIProvider struct {
// contains filtered or unexported fields
}
OpenAIProvider handles OpenAI family of models
func NewOpenAIProvider ¶
func NewOpenAIProvider() *OpenAIProvider
NewOpenAIProvider creates a new OpenAI provider instance
func (*OpenAIProvider) Configure ¶
func (o *OpenAIProvider) Configure(apiKey string) error
Configure sets up the provider with necessary credentials
func (*OpenAIProvider) GetConfig ¶
func (o *OpenAIProvider) GetConfig() ModelConfig
GetConfig returns the current provider configuration
func (*OpenAIProvider) SendPrompt ¶
func (o *OpenAIProvider) SendPrompt(modelName string, prompt string) (string, error)
SendPrompt sends a prompt to the specified model and returns the response
func (*OpenAIProvider) SendPromptWithFile ¶
func (o *OpenAIProvider) SendPromptWithFile(modelName string, prompt string, file FileInput) (string, error)
SendPromptWithFile sends a prompt along with a file to the specified model and returns the response
func (*OpenAIProvider) SetConfig ¶
func (o *OpenAIProvider) SetConfig(config ModelConfig)
SetConfig updates the provider configuration
func (*OpenAIProvider) SetVerbose ¶
func (o *OpenAIProvider) SetVerbose(verbose bool)
SetVerbose enables or disables verbose mode
func (*OpenAIProvider) SupportsModel ¶
func (o *OpenAIProvider) SupportsModel(modelName string) bool
SupportsModel checks if the given model name is supported by OpenAI
func (*OpenAIProvider) ValidateModel ¶
func (o *OpenAIProvider) ValidateModel(modelName string) bool
ValidateModel checks if the specific OpenAI model variant is valid
type Provider ¶
type Provider interface { Name() string SupportsModel(modelName string) bool SendPrompt(modelName string, prompt string) (string, error) SendPromptWithFile(modelName string, prompt string, file FileInput) (string, error) Configure(apiKey string) error SetVerbose(verbose bool) }
Provider represents a model provider (e.g., Anthropic, OpenAI)
type XAIProvider ¶
type XAIProvider struct {
// contains filtered or unexported fields
}
XAIProvider handles X.AI family of models
func NewXAIProvider ¶
func NewXAIProvider() *XAIProvider
NewXAIProvider creates a new X.AI provider instance
func (*XAIProvider) Configure ¶
func (x *XAIProvider) Configure(apiKey string) error
Configure sets up the provider with necessary credentials
func (*XAIProvider) GetConfig ¶
func (x *XAIProvider) GetConfig() ModelConfig
GetConfig returns the current provider configuration
func (*XAIProvider) SendPrompt ¶
func (x *XAIProvider) SendPrompt(modelName string, prompt string) (string, error)
SendPrompt sends a prompt to the specified model and returns the response
func (*XAIProvider) SendPromptWithFile ¶
func (x *XAIProvider) SendPromptWithFile(modelName string, prompt string, file FileInput) (string, error)
SendPromptWithFile sends a prompt along with a file to the specified model and returns the response
func (*XAIProvider) SetConfig ¶
func (x *XAIProvider) SetConfig(config ModelConfig)
SetConfig updates the provider configuration
func (*XAIProvider) SetVerbose ¶
func (x *XAIProvider) SetVerbose(verbose bool)
SetVerbose enables or disables verbose mode
func (*XAIProvider) SupportsModel ¶
func (x *XAIProvider) SupportsModel(modelName string) bool
SupportsModel checks if the given model name is supported by X.AI
func (*XAIProvider) ValidateModel ¶
func (x *XAIProvider) ValidateModel(modelName string) bool
ValidateModel checks if the specific X.AI model variant is valid