From f50b9558be30660bbf3959e06b3340cee039a5f4 Mon Sep 17 00:00:00 2001 From: Travis Wilson <35748617+trrwilson@users.noreply.github.com> Date: Thu, 13 Jul 2023 16:10:34 -0700 Subject: [PATCH] Align optionality of content filter categories (#24819) --- .../OpenAI.Inference/models/completions.common.tsp | 8 ++++---- .../inference/preview/2023-06-01-preview/generated.json | 8 +------- .../inference/preview/2023-07-01-preview/generated.json | 8 +------- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/specification/cognitiveservices/OpenAI.Inference/models/completions.common.tsp b/specification/cognitiveservices/OpenAI.Inference/models/completions.common.tsp index ba1343b13e2b..10608fa6e4f1 100644 --- a/specification/cognitiveservices/OpenAI.Inference/models/completions.common.tsp +++ b/specification/cognitiveservices/OpenAI.Inference/models/completions.common.tsp @@ -98,13 +98,13 @@ model ContentFilterResults { those portrayed as an assault or a forced sexual violent act against one’s will, prostitution, pornography, and abuse. """) - sexual: ContentFilterResult; + sexual?: ContentFilterResult; @doc(""" Describes language related to physical actions intended to hurt, injure, damage, or kill someone or something; describes weapons, etc. """) - violence: ContentFilterResult; + violence?: ContentFilterResult; @doc(""" Describes language attacks or uses that include pejorative or discriminatory language @@ -113,14 +113,14 @@ model ContentFilterResults { gender identity and expression, sexual orientation, religion, immigration status, ability status, personal appearance, and body size. """) - hate: ContentFilterResult; + hate?: ContentFilterResult; @doc(""" Describes language related to physical actions intended to purposely hurt, injure, or damage one’s body, or kill oneself. """) @projectedName("json", "self_harm") - selfHarm: ContentFilterResult; + selfHarm?: ContentFilterResult; } @added(ServiceApiVersions.v2023_06_01_Preview) diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-06-01-preview/generated.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-06-01-preview/generated.json index f26c66ee5986..576b78e8d966 100644 --- a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-06-01-preview/generated.json +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-06-01-preview/generated.json @@ -972,13 +972,7 @@ "description": "Describes language related to physical actions intended to purposely hurt, injure,\nor damage one’s body, or kill oneself.", "x-ms-client-name": "selfHarm" } - }, - "required": [ - "sexual", - "violence", - "hate", - "self_harm" - ] + } }, "ContentFilterSeverity": { "type": "string", diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-07-01-preview/generated.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-07-01-preview/generated.json index ebcace97ebf3..411186ce784d 100644 --- a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-07-01-preview/generated.json +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-07-01-preview/generated.json @@ -1005,13 +1005,7 @@ "description": "Describes language related to physical actions intended to purposely hurt, injure,\nor damage one’s body, or kill oneself.", "x-ms-client-name": "selfHarm" } - }, - "required": [ - "sexual", - "violence", - "hate", - "self_harm" - ] + } }, "ContentFilterSeverity": { "type": "string",