18 lines
371 B
Go
18 lines
371 B
Go
package config
|
|
|
|
const redactedSecret = "[REDACTED]"
|
|
|
|
func (c Config) Redacted() Config {
|
|
redacted := c
|
|
redacted.PrimaryLLM.APIKey = redactSecret(redacted.PrimaryLLM.APIKey)
|
|
redacted.ValidationLLM.APIKey = redactSecret(redacted.ValidationLLM.APIKey)
|
|
return redacted
|
|
}
|
|
|
|
func redactSecret(value string) string {
|
|
if value == "" {
|
|
return ""
|
|
}
|
|
return redactedSecret
|
|
}
|