Skip to content

Commit a1e2d59

Browse files
authored
Merge pull request #10 from sashabaranov/master
feat: add safety_identifier params (sashabaranov#1066)
2 parents 2f7ebb1 + f71d1a6 commit a1e2d59

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

chat.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,11 @@ type ChatCompletionRequest struct {
319319
ChatTemplateKwargs map[string]any `json:"chat_template_kwargs,omitempty"`
320320
// Specifies the latency tier to use for processing the request.
321321
ServiceTier ServiceTier `json:"service_tier,omitempty"`
322+
// A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
323+
// The IDs should be a string that uniquely identifies each user.
324+
// We recommend hashing their username or email address, in order to avoid sending us any identifying information.
325+
// https://platform.openai.com/docs/api-reference/chat/create#chat_create-safety_identifier
326+
SafetyIdentifier string `json:"safety_identifier,omitempty"`
322327
// Embedded struct for non-OpenAI extensions
323328
ChatCompletionRequestExtensions
324329
}

0 commit comments

Comments
 (0)