Class ChatCompletionChunk.Moderation.Output.ModerationResults.Result
-
- All Implemented Interfaces:
public final class ChatCompletionChunk.Moderation.Output.ModerationResults.ResultA moderation result produced for the response input or output.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classChatCompletionChunk.Moderation.Output.ModerationResults.Result.BuilderA builder for Result.
public final classChatCompletionChunk.Moderation.Output.ModerationResults.Result.CategoriesA dictionary of moderation categories to booleans, True if the input is flagged under this category.
public final classChatCompletionChunk.Moderation.Output.ModerationResults.Result.CategoryAppliedInputTypesWhich modalities of input are reflected by the score for each category.
public final classChatCompletionChunk.Moderation.Output.ModerationResults.Result.CategoryScoresA dictionary of moderation categories to scores.
-
Method Summary
-
-
Method Detail
-
categories
final ChatCompletionChunk.Moderation.Output.ModerationResults.Result.Categories categories()
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
-
categoryAppliedInputTypes
final ChatCompletionChunk.Moderation.Output.ModerationResults.Result.CategoryAppliedInputTypes categoryAppliedInputTypes()
Which modalities of input are reflected by the score for each category.
-
categoryScores
final ChatCompletionChunk.Moderation.Output.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<ChatCompletionChunk.Moderation.Output.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<ChatCompletionChunk.Moderation.Output.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<ChatCompletionChunk.Moderation.Output.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()
-
validate
final ChatCompletionChunk.Moderation.Output.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 ChatCompletionChunk.Moderation.Output.ModerationResults.Result.Builder builder()
Returns a mutable builder for constructing an instance of Result.
The following fields are required:
.categories() .categoryAppliedInputTypes() .categoryScores() .flagged() .model()
-
-
-
-