Skip to content

Commit d74bfff

Browse files
docs(api): update safety_identifier documentation in chat completions and responses
1 parent 91f4da8 commit d74bfff

File tree

6 files changed

+47
-32
lines changed

6 files changed

+47
-32
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 148
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a6dd5f8d7318fb1c5370d5ccb7148bacdfb3f3a665c4b85b7666e6188d9bd909.yml
3-
openapi_spec_hash: c4824e385a81b9021428304ccc96538f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-0d1a3d48d59d864f24002e6e58a4cf38cb80ba1f4b234f6f766789e2866820c8.yml
3+
openapi_spec_hash: 65fce2adfac759c10dc8bd51e09fa3db
44
config_hash: 948733484caf41e71093c6582dbc319c

src/openai/resources/chat/completions/completions.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,9 @@ def create(
439439
440440
safety_identifier: A stable identifier used to help detect users of your application that may be
441441
violating OpenAI's usage policies. The IDs should be a string that uniquely
442-
identifies each user. We recommend hashing their username or email address, in
443-
order to avoid sending us any identifying information.
442+
identifies each user, with a maximum length of 64 characters. We recommend
443+
hashing their username or email address, in order to avoid sending us any
444+
identifying information.
444445
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
445446
446447
seed: This feature is in Beta. If specified, our system will make a best effort to
@@ -753,8 +754,9 @@ def create(
753754
754755
safety_identifier: A stable identifier used to help detect users of your application that may be
755756
violating OpenAI's usage policies. The IDs should be a string that uniquely
756-
identifies each user. We recommend hashing their username or email address, in
757-
order to avoid sending us any identifying information.
757+
identifies each user, with a maximum length of 64 characters. We recommend
758+
hashing their username or email address, in order to avoid sending us any
759+
identifying information.
758760
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
759761
760762
seed: This feature is in Beta. If specified, our system will make a best effort to
@@ -1058,8 +1060,9 @@ def create(
10581060
10591061
safety_identifier: A stable identifier used to help detect users of your application that may be
10601062
violating OpenAI's usage policies. The IDs should be a string that uniquely
1061-
identifies each user. We recommend hashing their username or email address, in
1062-
order to avoid sending us any identifying information.
1063+
identifies each user, with a maximum length of 64 characters. We recommend
1064+
hashing their username or email address, in order to avoid sending us any
1065+
identifying information.
10631066
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
10641067
10651068
seed: This feature is in Beta. If specified, our system will make a best effort to
@@ -1932,8 +1935,9 @@ async def create(
19321935
19331936
safety_identifier: A stable identifier used to help detect users of your application that may be
19341937
violating OpenAI's usage policies. The IDs should be a string that uniquely
1935-
identifies each user. We recommend hashing their username or email address, in
1936-
order to avoid sending us any identifying information.
1938+
identifies each user, with a maximum length of 64 characters. We recommend
1939+
hashing their username or email address, in order to avoid sending us any
1940+
identifying information.
19371941
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
19381942
19391943
seed: This feature is in Beta. If specified, our system will make a best effort to
@@ -2246,8 +2250,9 @@ async def create(
22462250
22472251
safety_identifier: A stable identifier used to help detect users of your application that may be
22482252
violating OpenAI's usage policies. The IDs should be a string that uniquely
2249-
identifies each user. We recommend hashing their username or email address, in
2250-
order to avoid sending us any identifying information.
2253+
identifies each user, with a maximum length of 64 characters. We recommend
2254+
hashing their username or email address, in order to avoid sending us any
2255+
identifying information.
22512256
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
22522257
22532258
seed: This feature is in Beta. If specified, our system will make a best effort to
@@ -2551,8 +2556,9 @@ async def create(
25512556
25522557
safety_identifier: A stable identifier used to help detect users of your application that may be
25532558
violating OpenAI's usage policies. The IDs should be a string that uniquely
2554-
identifies each user. We recommend hashing their username or email address, in
2555-
order to avoid sending us any identifying information.
2559+
identifies each user, with a maximum length of 64 characters. We recommend
2560+
hashing their username or email address, in order to avoid sending us any
2561+
identifying information.
25562562
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
25572563
25582564
seed: This feature is in Beta. If specified, our system will make a best effort to

src/openai/resources/responses/responses.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,9 @@ def create(
238238
239239
safety_identifier: A stable identifier used to help detect users of your application that may be
240240
violating OpenAI's usage policies. The IDs should be a string that uniquely
241-
identifies each user. We recommend hashing their username or email address, in
242-
order to avoid sending us any identifying information.
241+
identifies each user, with a maximum length of 64 characters. We recommend
242+
hashing their username or email address, in order to avoid sending us any
243+
identifying information.
243244
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
244245
245246
service_tier: Specifies the processing type used for serving the request.
@@ -493,8 +494,9 @@ def create(
493494
494495
safety_identifier: A stable identifier used to help detect users of your application that may be
495496
violating OpenAI's usage policies. The IDs should be a string that uniquely
496-
identifies each user. We recommend hashing their username or email address, in
497-
order to avoid sending us any identifying information.
497+
identifies each user, with a maximum length of 64 characters. We recommend
498+
hashing their username or email address, in order to avoid sending us any
499+
identifying information.
498500
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
499501
500502
service_tier: Specifies the processing type used for serving the request.
@@ -741,8 +743,9 @@ def create(
741743
742744
safety_identifier: A stable identifier used to help detect users of your application that may be
743745
violating OpenAI's usage policies. The IDs should be a string that uniquely
744-
identifies each user. We recommend hashing their username or email address, in
745-
order to avoid sending us any identifying information.
746+
identifies each user, with a maximum length of 64 characters. We recommend
747+
hashing their username or email address, in order to avoid sending us any
748+
identifying information.
746749
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
747750
748751
service_tier: Specifies the processing type used for serving the request.
@@ -1875,8 +1878,9 @@ async def create(
18751878
18761879
safety_identifier: A stable identifier used to help detect users of your application that may be
18771880
violating OpenAI's usage policies. The IDs should be a string that uniquely
1878-
identifies each user. We recommend hashing their username or email address, in
1879-
order to avoid sending us any identifying information.
1881+
identifies each user, with a maximum length of 64 characters. We recommend
1882+
hashing their username or email address, in order to avoid sending us any
1883+
identifying information.
18801884
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
18811885
18821886
service_tier: Specifies the processing type used for serving the request.
@@ -2130,8 +2134,9 @@ async def create(
21302134
21312135
safety_identifier: A stable identifier used to help detect users of your application that may be
21322136
violating OpenAI's usage policies. The IDs should be a string that uniquely
2133-
identifies each user. We recommend hashing their username or email address, in
2134-
order to avoid sending us any identifying information.
2137+
identifies each user, with a maximum length of 64 characters. We recommend
2138+
hashing their username or email address, in order to avoid sending us any
2139+
identifying information.
21352140
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
21362141
21372142
service_tier: Specifies the processing type used for serving the request.
@@ -2378,8 +2383,9 @@ async def create(
23782383
23792384
safety_identifier: A stable identifier used to help detect users of your application that may be
23802385
violating OpenAI's usage policies. The IDs should be a string that uniquely
2381-
identifies each user. We recommend hashing their username or email address, in
2382-
order to avoid sending us any identifying information.
2386+
identifies each user, with a maximum length of 64 characters. We recommend
2387+
hashing their username or email address, in order to avoid sending us any
2388+
identifying information.
23832389
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
23842390
23852391
service_tier: Specifies the processing type used for serving the request.

src/openai/types/chat/completion_create_params.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,9 @@ class CompletionCreateParamsBase(TypedDict, total=False):
227227
"""
228228
A stable identifier used to help detect users of your application that may be
229229
violating OpenAI's usage policies. The IDs should be a string that uniquely
230-
identifies each user. We recommend hashing their username or email address, in
231-
order to avoid sending us any identifying information.
230+
identifies each user, with a maximum length of 64 characters. We recommend
231+
hashing their username or email address, in order to avoid sending us any
232+
identifying information.
232233
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
233234
"""
234235

src/openai/types/responses/response.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,9 @@ class Response(BaseModel):
233233
"""
234234
A stable identifier used to help detect users of your application that may be
235235
violating OpenAI's usage policies. The IDs should be a string that uniquely
236-
identifies each user. We recommend hashing their username or email address, in
237-
order to avoid sending us any identifying information.
236+
identifies each user, with a maximum length of 64 characters. We recommend
237+
hashing their username or email address, in order to avoid sending us any
238+
identifying information.
238239
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
239240
"""
240241

src/openai/types/responses/response_create_params.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,9 @@ class ResponseCreateParamsBase(TypedDict, total=False):
171171
"""
172172
A stable identifier used to help detect users of your application that may be
173173
violating OpenAI's usage policies. The IDs should be a string that uniquely
174-
identifies each user. We recommend hashing their username or email address, in
175-
order to avoid sending us any identifying information.
174+
identifies each user, with a maximum length of 64 characters. We recommend
175+
hashing their username or email address, in order to avoid sending us any
176+
identifying information.
176177
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
177178
"""
178179

0 commit comments

Comments
 (0)