Add Audita configuration contract

This commit is contained in:
2026-05-04 07:48:59 -05:00
parent 1b8fb78926
commit fbc53330ef
8 changed files with 543 additions and 7 deletions

View File

@@ -83,6 +83,7 @@ func applyPipelineDefaults(cfg *PipelineConfig) {
}
applyWhisperXDefaults(&cfg.WhisperX)
applySeriatimDefaults(&cfg.Seriatim)
applyAuditaDefaults(&cfg.Audita)
}
func applyWhisperXDefaults(cfg *WhisperXConfig) {
@@ -129,6 +130,44 @@ func applySeriatimDefaults(cfg *SeriatimConfig) {
}
}
func applyAuditaDefaults(cfg *AuditaConfig) {
if cfg == nil {
return
}
if cfg.Timeout == "" {
cfg.Timeout = "3h"
}
if cfg.LLMAPIKeyEnv == "" {
cfg.LLMAPIKeyEnv = "AUDITA_LLM_API_KEY"
}
if cfg.Modules == nil {
cfg.Modules = []string{
"glossary",
"homophones",
"glossary",
"spoken_word",
"grammar",
"homophones",
"glossary",
}
}
if cfg.BaseURL == "" {
cfg.BaseURL = "https://openrouter.ai/api/v1"
}
if cfg.Model == "" {
cfg.Model = "openrouter/google/gemma-4-31b-it"
}
if cfg.LLMConcurrency == nil {
cfg.LLMConcurrency = intPtr(1)
}
if cfg.ValidationLLMConcurrency == nil {
cfg.ValidationLLMConcurrency = intPtr(1)
}
if cfg.Report == nil {
cfg.Report = boolPtr(true)
}
}
func float64Ptr(v float64) *float64 {
p := v
return &p