Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultProvider = "openai" DefaultOpenAIModel = "chatgpt-4o-latest" DefaultGeminiModel = "models/gemini-2.0-flash" DefaultAnthropicModel = "claude-3-5-sonnet-latest" DefaultDeepseekModel = "deepseek-chat" DefaultPhindModel = "Phind-70B" // Valor padrão para o modelo phind )
Variables ¶
View Source
var ( DefaultAuthorName = "ai-commit" DefaultAuthorEmail = "ai-commit@example.com" )
Functions ¶
func ResolveAPIKey ¶
Types ¶
type Config ¶
type Config struct {
Prompt string `yaml:"prompt,omitempty"`
CommitType string `yaml:"commitType,omitempty"`
Template string `yaml:"template,omitempty"`
SemanticRelease bool `yaml:"semanticRelease,omitempty"`
InteractiveSplit bool `yaml:"interactiveSplit,omitempty"`
EnableEmoji bool `yaml:"enableEmoji,omitempty"`
Provider string `yaml:"provider,omitempty" validate:"omitempty,oneof=openai gemini anthropic deepseek phind"`
CommitTypes []string `yaml:"commitTypes,omitempty"`
LockFiles []string `yaml:"lockFiles,omitempty"`
OpenAIAPIKey string `yaml:"openAiApiKey,omitempty"`
OpenAIModel string `yaml:"openaiModel,omitempty"`
GeminiAPIKey string `yaml:"geminiApiKey,omitempty"`
GeminiModel string `yaml:"geminiModel,omitempty"`
AnthropicAPIKey string `yaml:"anthropicApiKey,omitempty"`
AnthropicModel string `yaml:"anthropicModel,omitempty"`
DeepseekAPIKey string `yaml:"deepseekApiKey,omitempty"`
DeepseekModel string `yaml:"deepseekModel,omitempty"`
PhindAPIKey string `yaml:"phindApiKey,omitempty"` // Novo campo para Phind
PhindModel string `yaml:"phindModel,omitempty"` // Novo campo para Phind
PromptTemplate string `yaml:"promptTemplate,omitempty"`
AuthorName string `yaml:"authorName,omitempty"`
AuthorEmail string `yaml:"authorEmail,omitempty"`
}
func LoadOrCreateConfig ¶
LoadOrCreateConfig reads the config from ~/.config/<binary>/config.yaml or creates a default one.
Click to show internal directories.
Click to hide internal directories.