Back to Firebase Js Sdk

PromptFeedback interface

docs-devsite/ai.promptfeedback.md

12.12.11.6 KB
Original Source

Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference

{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}

PromptFeedback interface

If the prompt was blocked, this will be populated with blockReason and the relevant safetyRatings<!-- -->.

<b>Signature:</b>

typescript
export interface PromptFeedback 

Properties

PropertyTypeDescription
blockReasonBlockReason
blockReasonMessagestringA human-readable description of the <code>blockReason</code>.<!-- -->This property is only supported in the Vertex AI Gemini API (VertexAIBackend<!-- -->).
safetyRatingsSafetyRating<!-- -->[]

PromptFeedback.blockReason

<b>Signature:</b>

typescript
blockReason?: BlockReason;

PromptFeedback.blockReasonMessage

A human-readable description of the blockReason<!-- -->.

This property is only supported in the Vertex AI Gemini API (VertexAIBackend<!-- -->).

<b>Signature:</b>

typescript
blockReasonMessage?: string;

PromptFeedback.safetyRatings

<b>Signature:</b>

typescript
safetyRatings: SafetyRating[];