From 8033f54e39232f0738f661f73c287b7fe8838fd2 Mon Sep 17 00:00:00 2001 From: Julio Martins Date: Tue, 1 Oct 2024 09:46:02 -0300 Subject: [PATCH] add profanity content filter --- chat.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chat.go b/chat.go index 38dff1a4..198b4a47 100644 --- a/chat.go +++ b/chat.go @@ -46,12 +46,18 @@ type JailBreak struct { Detected bool `json:"detected"` } +type Profanity struct { + Filtered bool `json:"filtered"` + Detected bool `json:"detected"` +} + type ContentFilterResults struct { Hate Hate `json:"hate,omitempty"` SelfHarm SelfHarm `json:"self_harm,omitempty"` Sexual Sexual `json:"sexual,omitempty"` Violence Violence `json:"violence,omitempty"` JailBreak JailBreak `json:"jailbreak,omitempty"` + Profanity Profanity `json:"profanity,omitempty"` } type PromptAnnotation struct {