TextGenerationResponse represents a response of a language model.
.. attribute:: text
The generated text
:type: str
Attributes
Name
Description
is_blocked
bool
Whether the the request was blocked.
errors
Tuple[int]
The error codes indicate why the response was blocked.
Learn more information about safety errors here:
this documentation https://cloud.google.com/vertex-ai/docs/generative-ai/learn/responsible-ai#safety_errors
safety_attributes
Dict[str, float]
Scores for safety attributes.
Learn more about the safety attributes here:
https://cloud.google.com/vertex-ai/docs/generative-ai/learn/responsible-ai#safety_attribute_descriptions
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-04-01 UTC."],[],[]]