Skip to content

Commit 0978d8a

Browse files
feat(api): api update
1 parent c4ca378 commit 0978d8a

2 files changed

Lines changed: 19 additions & 15 deletions

File tree

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 27
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-1bc6ac7fd0ec0c55304b9b847541fa456d3caa754f28aa54b6bec79b30da76a1.yml
3-
openapi_spec_hash: 7a9eaa12e311a424bd913a8a7b473a9c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-b1a168c5b055c5dbc30b3e92d02c3065f452d03c1ad762878c60d5554cc4daca.yml
3+
openapi_spec_hash: 76d503c11575d55fb72376018fa8387d
44
config_hash: 9d144cc6c49d3fd53e5b4472c1e22165

‎src/moderation_api/types/content_submit_response.py‎

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -352,22 +352,26 @@ class Recommendation(BaseModel):
352352
"""The action to take based on the recommendation"""
353353

354354
reason_codes: List[
355-
Literal[
356-
"severity_reject",
357-
"severity_review",
358-
"author_block",
359-
"dry_run",
360-
"trusted_allow",
361-
"untrusted_severity",
362-
"rule_match",
363-
"rule_default",
364-
"rule_fallback",
365-
"client_override",
355+
Union[
356+
Literal[
357+
"severity_reject",
358+
"severity_review",
359+
"author_block",
360+
"dry_run",
361+
"trusted_allow",
362+
"untrusted_severity",
363+
"rule_match",
364+
"rule_default",
365+
"rule_fallback",
366+
"client_override",
367+
],
368+
str,
366369
]
367370
]
368-
"""The reason code for the recommendation.
371+
"""Reason codes for the recommendation.
369372
370-
Can be used to display a reason to the user.
373+
Standard codes plus a `rule:<key>` code identifying the rule that produced the
374+
action. Can be used to display a reason to the user.
371375
"""
372376

373377
matched_rules: Optional[List[RecommendationMatchedRule]] = None

0 commit comments

Comments
 (0)