Package com.azure.ai.openai.models
Class ContentFilterResultsForPrompt
java.lang.Object
com.azure.ai.openai.models.ContentFilterResultsForPrompt
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ContentFilterResultsForPrompt>
public final class ContentFilterResultsForPrompt
extends Object
implements com.azure.json.JsonSerializable<ContentFilterResultsForPrompt>
Content filtering results for a single prompt in the request.
-
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ContentFilterResultsForPrompt from the JsonReader.Get the contentFilterResults property: Content filtering results for this prompt.intGet the promptIndex property: The index of this prompt in the set of prompt results.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter)
-
Method Details
-
getPromptIndex
public int getPromptIndex()Get the promptIndex property: The index of this prompt in the set of prompt results.- Returns:
- the promptIndex value.
-
getContentFilterResults
Get the contentFilterResults property: Content filtering results for this prompt.- Returns:
- the contentFilterResults value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ContentFilterResultsForPrompt>- Throws:
IOException
-
fromJson
public static ContentFilterResultsForPrompt fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ContentFilterResultsForPrompt from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ContentFilterResultsForPrompt if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the ContentFilterResultsForPrompt.
-