Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnthropicConfig ¶
type AnthropicConfig struct {
APIKey string `yaml:"api_key" json:"api_key"`
Model string `yaml:"model" json:"model"`
}
AnthropicConfig holds Anthropic-specific configuration
type AnthropicRequest ¶
AnthropicRequest represents the request structure for Anthropic API
type AnthropicResponse ¶
type AnthropicResponse struct {
Content []Message `json:"content"`
}
AnthropicResponse represents the response structure from Anthropic API
type Config ¶
type Config struct {
Type ModelType `yaml:"type" json:"type"`
OpenAI OpenAIConfig `yaml:"openai,omitempty" json:"openai,omitempty"`
Ollama OllamaConfig `yaml:"ollama,omitempty" json:"ollama,omitempty"`
Anthropic AnthropicConfig `yaml:"anthropic,omitempty" json:"anthropic,omitempty"`
}
Config holds the configuration for AI models
func LoadConfig ¶
LoadConfig loads the configuration from the specified file
type OllamaConfig ¶
type OllamaConfig struct {
BaseURL string `yaml:"base_url" json:"base_url"`
Model string `yaml:"model" json:"model"`
}
OllamaConfig holds Ollama-specific configuration
type OllamaRequest ¶
type OllamaRequest struct {
Model string `json:"model"`
Messages []Message `json:"messages"`
Stream bool `json:"stream"` // Always set to false
}
OllamaRequest represents the request structure for Ollama API
type OllamaResponse ¶
type OllamaResponse struct {
Message Message `json:"message"`
}
OllamaResponse represents the response structure from Ollama API
type OpenAIConfig ¶
type OpenAIConfig struct {
APIKey string `yaml:"api_key" json:"api_key"`
Model string `yaml:"model" json:"model"`
}
OpenAIConfig holds OpenAI-specific configuration
type OpenAIRequest ¶
type OpenAIRequest struct {
Model string `json:"model"`
Messages []Message `json:"messages"`
Stream bool `json:"stream"` // Always set to false
}
OpenAIRequest represents the request structure for OpenAI API
type OpenAIResponse ¶
type OpenAIResponse struct {
Choices []struct {
Message Message `json:"message"`
} `json:"choices"`
}
OpenAIResponse represents the response structure from OpenAI API