Documentation
¶
Index ¶
- func GenerateBranchName(prompt string, config Config) (string, error)
- func GenerateCommitMessage(prompt string, config Config) (string, error)
- type AnthropicConfig
- type AnthropicRequest
- type AnthropicResponse
- type Config
- type DeepSeekConfig
- type DeepSeekRequest
- type DeepSeekResponse
- type Message
- type ModelType
- type OllamaConfig
- type OllamaRequest
- type OllamaResponse
- type OpenAIConfig
- type OpenAIRequest
- type OpenAIResponse
- type QwenConfig
- type QwenRequest
- type QwenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateBranchName ¶ added in v0.0.4
GenerateBranchName generates a branch name using the configured AI model
Types ¶
type AnthropicConfig ¶
type AnthropicConfig struct {
APIKey string `yaml:"api_key" json:"api_key"`
Model string `yaml:"model" json:"model"`
BaseURL string `yaml:"base_url" json:"base_url"`
}
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"`
DeepSeek DeepSeekConfig `yaml:"deepseek,omitempty" json:"deepseek,omitempty"`
Qwen QwenConfig `yaml:"qwen,omitempty" json:"qwen,omitempty"`
}
Config holds the configuration for AI models
func LoadConfig ¶
LoadConfig loads the configuration from the specified file
type DeepSeekConfig ¶ added in v0.0.3
type DeepSeekConfig struct {
APIKey string `yaml:"api_key" json:"api_key"`
Model string `yaml:"model" json:"model"`
BaseURL string `yaml:"base_url" json:"base_url"`
}
DeepSeekConfig holds DeepSeek-specific configuration
type DeepSeekRequest ¶ added in v0.0.3
type DeepSeekRequest struct {
Model string `json:"model"`
Messages []Message `json:"messages"`
Stream bool `json:"stream"` // Always set to false
}
DeepSeekRequest represents the request structure for DeepSeek API
type DeepSeekResponse ¶ added in v0.0.3
type DeepSeekResponse struct {
Choices []struct {
Message Message `json:"message"`
} `json:"choices"`
}
DeepSeekResponse represents the response structure from DeepSeek API
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"`
BaseURL string `yaml:"base_url" json:"base_url"`
}
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
type QwenConfig ¶ added in v0.0.3
type QwenConfig struct {
APIKey string `yaml:"api_key" json:"api_key"`
Model string `yaml:"model" json:"model"`
BaseURL string `yaml:"base_url" json:"base_url"`
}
QwenConfig holds Qwen-specific configuration
type QwenRequest ¶ added in v0.0.3
type QwenRequest struct {
Model string `json:"model"`
Messages []Message `json:"messages"`
Stream bool `json:"stream"`
}
QwenRequest represents the request structure for Qwen API
type QwenResponse ¶ added in v0.0.3
type QwenResponse struct {
Choices []struct {
Message Message `json:"message"`
} `json:"choices"`
}
QwenResponse represents the response structure from Qwen API