fix: use one content classifier across all log redaction paths
This commit is contained in:
@@ -116,16 +116,6 @@ func redactForm(body string) (string, bool) {
|
||||
|
||||
var textFieldLine = regexp.MustCompile(`^\s*([A-Za-z_][A-Za-z0-9_.-]*)\s*[:=]`)
|
||||
|
||||
func conversationField(key string) bool {
|
||||
key = strings.ToLower(strings.NewReplacer("_", "", "-", "", ".", "").Replace(key))
|
||||
switch key {
|
||||
case "prompt", "systemprompt", "systemmessage", "instructions", "messages", "transcript", "transcription", "text", "content", "audio", "closingremark", "conversation":
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func redactConversationLines(body string) string {
|
||||
lines := strings.SplitAfter(body, "\n")
|
||||
hiding := false
|
||||
|
||||
Reference in New Issue
Block a user