public readonly property finishReason as String
Provider termination reason, or empty when unavailable. length means generation exhausted its budget and may be incomplete.
length
if response.finishReason == "length": print("Output was truncated")