Reference documentation and code samples for the Vertex AI V1 API class Google::Cloud::AIPlatform::V1::GenerateContentResponse.
Response message for [PredictionService.GenerateContent].
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#candidates
def candidates() -> ::Array<::Google::Cloud::AIPlatform::V1::Candidate>
Returns
- (::Array<::Google::Cloud::AIPlatform::V1::Candidate>) — Output only. Generated candidates.
#prompt_feedback
def prompt_feedback() -> ::Google::Cloud::AIPlatform::V1::GenerateContentResponse::PromptFeedback
Returns
- (::Google::Cloud::AIPlatform::V1::GenerateContentResponse::PromptFeedback) — Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations.
#usage_metadata
def usage_metadata() -> ::Google::Cloud::AIPlatform::V1::GenerateContentResponse::UsageMetadata
Returns
- (::Google::Cloud::AIPlatform::V1::GenerateContentResponse::UsageMetadata) — Usage metadata about the response(s).
#usage_metadata=
def usage_metadata=(value) -> ::Google::Cloud::AIPlatform::V1::GenerateContentResponse::UsageMetadata
Parameter
- value (::Google::Cloud::AIPlatform::V1::GenerateContentResponse::UsageMetadata) — Usage metadata about the response(s).
Returns
- (::Google::Cloud::AIPlatform::V1::GenerateContentResponse::UsageMetadata) — Usage metadata about the response(s).