Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenerateStats ¶
type GenerativeAI ¶
type GenerativeAI interface { Chat(messages []Message) (string, GenerateStats, error) Complete(prompt string) (string, GenerateStats, error) }
func New ¶
func New(p Provider, config ProviderConfig) (GenerativeAI, error)
type Ollama ¶
type OllamaConfig ¶
func (*OllamaConfig) Validate ¶
func (c *OllamaConfig) Validate() error
type OpenAI ¶
type OpenAI struct { Client *openai.Client Model string FrequencyPenalty float64 MaxTokens int64 PresencePenalty float64 ReasoningEffort string Stop string Temperature float64 TopP float64 }
type OpenAIConfig ¶
type OpenAIConfig struct { BaseURL string APIKey string Model string FrequencyPenalty float64 MaxTokens int64 PresencePenalty float64 ReasoningEffort string Stop string Temperature float64 TopP float64 }
func (*OpenAIConfig) Validate ¶
func (c *OpenAIConfig) Validate() error
type ProviderConfig ¶
type ProviderConfig interface {
Validate() error
}
type ProviderFactory ¶
type ProviderFactory func(ProviderConfig) (GenerativeAI, error)
Click to show internal directories.
Click to hide internal directories.