Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content

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

A single turn in a conversation with the model.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1Content

Returns a new instance of GoogleCloudAiplatformV1beta1Content.



2291
2292
2293
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2291

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

Instance Attribute Details

#partsArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Part>

Required. Ordered parts that make up a message. Parts may have different MIME types. Corresponds to the JSON property parts



2282
2283
2284
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2282

def parts
  @parts
end

#roleString

Optional. The role in a conversation associated with this content. Set it only if a content represents a turn in a conversations, otherwise no need to set role. Possible values: user, model. Corresponds to the JSON property role

Returns:

  • (String)


2289
2290
2291
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2289

def role
  @role
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2296
2297
2298
2299
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2296

def update!(**args)
  @parts = args[:parts] if args.key?(:parts)
  @role = args[:role] if args.key?(:role)
end