From 6e09928305805a78e306d0b10c5905ab16f5e2bd Mon Sep 17 00:00:00 2001 From: Liu Shuang Date: Tue, 12 Aug 2025 14:40:11 +0800 Subject: [PATCH] feat: add safety_identifier params --- chat.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chat.go b/chat.go index 0bb2e98ee..9719f6b92 100644 --- a/chat.go +++ b/chat.go @@ -320,6 +320,11 @@ type ChatCompletionRequest struct { ChatTemplateKwargs map[string]any `json:"chat_template_kwargs,omitempty"` // Specifies the latency tier to use for processing the request. ServiceTier ServiceTier `json:"service_tier,omitempty"` + // A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. + // The IDs should be a string that uniquely identifies each user. + // We recommend hashing their username or email address, in order to avoid sending us any identifying information. + // https://platform.openai.com/docs/api-reference/chat/create#chat_create-safety_identifier + SafetyIdentifier string `json:"safety_identifier,omitempty"` // Embedded struct for non-OpenAI extensions ChatCompletionRequestExtensions }