Files
ds2api/internal/httpapi/openai/shared/output_clean.go
2026-04-26 06:58:20 +08:00

14 lines
285 B
Go

package shared
import textclean "ds2api/internal/textclean"
func CleanVisibleOutput(text string, stripReferenceMarkers bool) string {
if text == "" {
return text
}
if stripReferenceMarkers {
text = textclean.StripReferenceMarkers(text)
}
return sanitizeLeakedOutput(text)
}