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"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-07-01 UTC."],[],[]]