The response from the model, including candidate completions.
JSON representation |
---|
{ "candidates": [ { object ( |
Fields | |
---|---|
candidates[] |
Candidate responses from the model. |
filters[] |
A set of content filtering metadata for the prompt and response text. This indicates which The blocking is configured by the |
safetyFeedback[] |
Returns any safety feedback related to content filtering. |
TextCompletion
Output text returned from a model.
JSON representation |
---|
{ "output": string, "safetyRatings": [ { object ( |
Fields | |
---|---|
output |
Output only. The generated text returned from the model. |
safetyRatings[] |
Ratings for the safety of a response. There is at most one rating per category. |
citationMetadata |
Output only. Citation information for model-generated This field may be populated with attribution information for any text included in the |
SafetyRating
Safety rating for a piece of content.
The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here.
JSON representation |
---|
{ "category": enum ( |
Fields | |
---|---|
category |
Required. The category for this rating. |
probability |
Required. The probability of harm for this content. |
HarmProbability
The probability that a piece of content is harmful.
The classification system gives the probability of the content being unsafe. This does not indicate the severity of harm for a piece of content.
Enums | |
---|---|
HARM_PROBABILITY_UNSPECIFIED |
Probability is unspecified. |
NEGLIGIBLE |
Content has a negligible chance of being unsafe. |
LOW |
Content has a low chance of being unsafe. |
MEDIUM |
Content has a medium chance of being unsafe. |
HIGH |
Content has a high chance of being unsafe. |
SafetyFeedback
Safety feedback for an entire request.
This field is populated if content in the input and/or response is blocked due to safety settings. SafetyFeedback may not exist for every HarmCategory. Each SafetyFeedback will return the safety settings used by the request as well as the lowest HarmProbability that should be allowed in order to return a result.
JSON representation |
---|
{ "rating": { object ( |
Fields | |
---|---|
rating |
Safety rating evaluated from content. |
setting |
Safety settings applied to the request. |