Files
notarius/internal/core/config/redaction.go

15 lines
292 B
Go

package config
const redactedSecret = "[REDACTED]"
func (c Config) Redacted() Config {
redacted := cloneConfig(c)
for id, profile := range redacted.LLMProfiles {
if profile.APIKey != "" {
profile.APIKey = redactedSecret
}
redacted.LLMProfiles[id] = profile
}
return redacted
}