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 String

A message describing the reason that content was blocked, if any.

final @NonNull List<@NonNull SafetyRating>

A list of relevant SafetyRating.

Public constructors

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

Public fields

blockReason

public final BlockReason blockReason

The reason that content was blocked, if at all.

blockReasonMessage

public final String blockReasonMessage

A message describing the reason that content was blocked, if any.

safetyRatings

public final @NonNull List<@NonNull SafetyRatingsafetyRatings

A list of relevant SafetyRating.

Public constructors

PromptFeedback

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

The reason that content was blocked, if at all.

@NonNull List<@NonNull SafetyRating> safetyRatings

A list of relevant SafetyRating.

String blockReasonMessage

A message describing the reason that content was blocked, if any.