Delen via


ContentFilterDetectionResult Class

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

Implements

public final class ContentFilterDetectionResult
implements JsonSerializable<ContentFilterDetectionResult>

Represents the outcome of a detection operation performed by content filtering.

Method Summary

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

Reads an instance of ContentFilterDetectionResult from the JsonReader.

boolean isDetected()

Get the detected property: A value indicating whether detection occurred, irrespective of severity or whether the content was filtered.

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 ContentFilterDetectionResult fromJson(JsonReader jsonReader)

Reads an instance of ContentFilterDetectionResult from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ContentFilterDetectionResult 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.

isDetected

public boolean isDetected()

Get the detected property: A value indicating whether detection occurred, irrespective of severity or whether the content was filtered.

Returns:

the detected 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