Class ChatCompletion.Moderation.Input.ModerationResults.Result
-
- All Implemented Interfaces:
public final class ChatCompletion.Moderation.Input.ModerationResults.ResultA moderation result produced for the response input or output.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classChatCompletion.Moderation.Input.ModerationResults.Result.BuilderA builder for Result.
public final classChatCompletion.Moderation.Input.ModerationResults.Result.CategoriesA dictionary of moderation categories to booleans, True if the input is flagged under this category.
public final classChatCompletion.Moderation.Input.ModerationResults.Result.CategoryAppliedInputTypesWhich modalities of input are reflected by the score for each category.
public final classChatCompletion.Moderation.Input.ModerationResults.Result.CategoryScoresA dictionary of moderation categories to scores.
-
Method Summary
-
-
Method Detail
-
categories
final ChatCompletion.Moderation.Input.ModerationResults.Result.Categories categories()
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
-
categoryAppliedInputTypes
final ChatCompletion.Moderation.Input.ModerationResults.Result.CategoryAppliedInputTypes categoryAppliedInputTypes()
Which modalities of input are reflected by the score for each category.
-
categoryScores
final ChatCompletion.Moderation.Input.ModerationResults.Result.CategoryScores categoryScores()
A dictionary of moderation categories to scores.
-
flagged
final Boolean flagged()
A boolean indicating whether the content was flagged by any category.
-
_type
final JsonValue _type()
The object type, which was always
moderation_resultfor successful moderation results.Expected to always return the following:
JsonValue.from("moderation_result")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_categories
final JsonField<ChatCompletion.Moderation.Input.ModerationResults.Result.Categories> _categories()
Returns the raw JSON value of categories.
Unlike categories, this method doesn't throw if the JSON field has an unexpected type.
-
_categoryAppliedInputTypes
final JsonField<ChatCompletion.Moderation.Input.ModerationResults.Result.CategoryAppliedInputTypes> _categoryAppliedInputTypes()
Returns the raw JSON value of categoryAppliedInputTypes.
Unlike categoryAppliedInputTypes, this method doesn't throw if the JSON field has an unexpected type.
-
_categoryScores
final JsonField<ChatCompletion.Moderation.Input.ModerationResults.Result.CategoryScores> _categoryScores()
Returns the raw JSON value of categoryScores.
Unlike categoryScores, this method doesn't throw if the JSON field has an unexpected type.
-
_flagged
final JsonField<Boolean> _flagged()
Returns the raw JSON value of flagged.
Unlike flagged, this method doesn't throw if the JSON field has an unexpected type.
-
_model
final JsonField<String> _model()
Returns the raw JSON value of model.
Unlike model, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ChatCompletion.Moderation.Input.ModerationResults.Result.Builder toBuilder()
-
validate
final ChatCompletion.Moderation.Input.ModerationResults.Result validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static ChatCompletion.Moderation.Input.ModerationResults.Result.Builder builder()
Returns a mutable builder for constructing an instance of Result.
The following fields are required:
.categories() .categoryAppliedInputTypes() .categoryScores() .flagged() .model()
-
-
-
-