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.



24377
24378
24379
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24377

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

Instance Attribute Details

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

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



24346
24347
24348
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24346

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)


24351
24352
24353
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24351

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)


24356
24357
24358
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24356

def model_version
  @model_version
end

#prompt_feedbackGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback

Content filter results for a prompt sent in the request. Note: This is sent only in the first stream chunk and only if no candidates were generated due to content violations. Corresponds to the JSON property promptFeedback



24363
24364
24365
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24363

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)


24369
24370
24371
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24369

def response_id
  @response_id
end

#usage_metadataGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata

Usage metadata about the content generation request and response. This message provides a detailed breakdown of token usage and other relevant metrics. Corresponds to the JSON property usageMetadata



24375
24376
24377
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24375

def 
  @usage_metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



24382
24383
24384
24385
24386
24387
24388
24389
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24382

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