Skip to content

Commit cd6abb2

Browse files
liushuanglsRosenberg96
authored andcommitted
feat: add safety_identifier params (sashabaranov#1066)
1 parent eb7a382 commit cd6abb2

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
@@ -351,6 +351,11 @@ type ChatCompletionRequest struct {
351351
ChatTemplateKwargs map[string]any `json:"chat_template_kwargs,omitempty"`
352352
// Specifies the latency tier to use for processing the request.
353353
ServiceTier ServiceTier `json:"service_tier,omitempty"`
354+
// A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
355+
// The IDs should be a string that uniquely identifies each user.
356+
// We recommend hashing their username or email address, in order to avoid sending us any identifying information.
357+
// https://platform.openai.com/docs/api-reference/chat/create#chat_create-safety_identifier
358+
SafetyIdentifier string `json:"safety_identifier,omitempty"`
354359
// Embedded struct for non-OpenAI extensions
355360
ChatCompletionRequestExtensions
356361
}

0 commit comments

Comments
 (0)