Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GenerateContentResponse

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb

Overview

Response message for [PredictionService.GenerateContent].

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1GenerateContentResponse

Returns a new instance of GoogleCloudAiplatformV1beta1GenerateContentResponse.



13055
13056
13057
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 13055

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#candidatesArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Candidate>

Output only. Generated candidates. Corresponds to the JSON property candidates



13038
13039
13040
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 13038

def candidates
  @candidates
end

#model_versionString

Output only. The model version used to generate the response. Corresponds to the JSON property modelVersion

Returns:

  • (String)


13043
13044
13045
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 13043

def model_version
  @model_version
end

#prompt_feedbackGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback

Content filter results for a prompt sent in the request. Corresponds to the JSON property promptFeedback



13048
13049
13050
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 13048

def prompt_feedback
  @prompt_feedback
end

#usage_metadataGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata

Usage metadata about response(s). Corresponds to the JSON property usageMetadata



13053
13054
13055
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 13053

def 
  @usage_metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



13060
13061
13062
13063
13064
13065
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 13060

def update!(**args)
  @candidates = args[:candidates] if args.key?(:candidates)
  @model_version = args[:model_version] if args.key?(:model_version)
  @prompt_feedback = args[:prompt_feedback] if args.key?(:prompt_feedback)
  @usage_metadata = args[:usage_metadata] if args.key?(:usage_metadata)
end