Delen via


ContentFilterResult Class

  • java.lang.Object
    • com.azure.ai.openai.models.ContentFilterResult

Implements

public final class ContentFilterResult
implements JsonSerializable<ContentFilterResult>

Information about filtered content severity level and if it has been filtered or not.

Method Summary

Modifier and Type Method and Description
static ContentFilterResult fromJson(JsonReader jsonReader)

Reads an instance of ContentFilterResult from the JsonReader.

ContentFilterSeverity getSeverity()

Get the severity property: Ratings for the intensity and risk level of filtered content.

boolean isFiltered()

Get the filtered property: A value indicating whether or not the content has been filtered.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static ContentFilterResult fromJson(JsonReader jsonReader)

Reads an instance of ContentFilterResult from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ContentFilterResult if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getSeverity

public ContentFilterSeverity getSeverity()

Get the severity property: Ratings for the intensity and risk level of filtered content.

Returns:

the severity value.

isFiltered

public boolean isFiltered()

Get the filtered property: A value indicating whether or not the content has been filtered.

Returns:

the filtered value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to