diff --git a/gpt3.go b/gpt3.go index 7bd091c..b469f15 100644 --- a/gpt3.go +++ b/gpt3.go @@ -15,7 +15,28 @@ // Stop: []string{"You:"}, // } // +//The content filter endpoint is used to validate a prompt in order to safeguard responses ushered back to the enduser. +//The request object should always have the following parameters: // +// reformattedPrompt := fmt.Sprintf("<|endoftext|>[%s]\n--\nLabel:", string(query)) +// +// req := gpt3.ContentFilterRequest{ +// Prompt: reformattedPrompt, +// MaxTokens: 1, +// TopP: 0, +// Temperature: 0, +// Logprobs: 10, +// } +// +// The Response is the same format as that of the Completions request with the following entries: +// +// 0 => text is safe +// 1 => This text is sensitive. This means that the text could be talking about a sensitive topic, something political, +// religious, or talking about a protected class such as race or nationality. +// 2 => This text is unsafe. This means that the text contains profane language, prejudiced or hateful language, +// something that could be NSFW, or text that portrays certain groups/people in a harmful manner. +// + package gpt3 import (