feat: implement YAML-based configuration, .env support, and customizable prompt templates for AI analysis

This commit is contained in:
2026-08-22 10:17:38 -07:00
parent 7ec91f384f
commit 0de312edbd
30 changed files with 895 additions and 211 deletions
+5 -2
View File
@@ -9,8 +9,9 @@ import (
)
type FilterConfig struct {
HardKeywords []string `yaml:"hard_keywords"`
ScoringWeights []filter.KeywordWeight `yaml:"scoring_weights"`
HardKeywords []string `yaml:"hard_keywords"`
AnalysisThreshold float64 `yaml:"analysis_threshold"`
ScoringWeights []filter.KeywordWeight `yaml:"scoring_weights"`
}
func LoadFilterConfig(path string) (*FilterConfig, error) {
@@ -20,6 +21,8 @@ func LoadFilterConfig(path string) (*FilterConfig, error) {
}
var cfg FilterConfig
// Default threshold if not specified
cfg.AnalysisThreshold = 25.0
if err := yaml.Unmarshal(data, &cfg); err != nil {
return nil, fmt.Errorf("failed to unmarshal filter config: %w", err)
}