Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerateContentResponse

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

Overview

Response message for [PredictionService.GenerateContent].

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1GenerateContentResponse

Returns a new instance of GoogleCloudAiplatformV1GenerateContentResponse.



12268
12269
12270
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12268

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

Instance Attribute Details

#candidatesArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Candidate>

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



12240
12241
12242
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12240

def candidates
  @candidates
end

#create_timeString

Output only. Timestamp when the request is made to the server. Corresponds to the JSON property createTime

Returns:

  • (String)


12245
12246
12247
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12245

def create_time
  @create_time
end

#model_versionString

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

Returns:

  • (String)


12250
12251
12252
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12250

def model_version
  @model_version
end

#prompt_feedbackGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerateContentResponsePromptFeedback

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



12255
12256
12257
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12255

def prompt_feedback
  @prompt_feedback
end

#response_idString

Output only. response_id is used to identify each response. It is the encoding of the event_id. Corresponds to the JSON property responseId

Returns:

  • (String)


12261
12262
12263
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12261

def response_id
  @response_id
end

#usage_metadataGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata

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



12266
12267
12268
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12266

def 
  @usage_metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



12273
12274
12275
12276
12277
12278
12279
12280
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12273

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