PromptFeedback

public final class PromptFeedback


Feedback on the prompt provided in the request.

Summary

Public fields

final BlockReason

The reason that content was blocked, if at all.

final @NonNull List<@NonNull SafetyRating>

A list of relevant SafetyRating.

Public constructors

PromptFeedback(
    BlockReason blockReason,
    @NonNull List<@NonNull SafetyRating> safetyRatings
)

Public fields

blockReason

public final BlockReason blockReason

The reason that content was blocked, if at all.

safetyRatings

public final @NonNull List<@NonNull SafetyRatingsafetyRatings

A list of relevant SafetyRating.

Public constructors

PromptFeedback

public PromptFeedback(
    BlockReason blockReason,
    @NonNull List<@NonNull SafetyRating> safetyRatings
)
Parameters
BlockReason blockReason

The reason that content was blocked, if at all.

@NonNull List<@NonNull SafetyRating> safetyRatings

A list of relevant SafetyRating.