Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content

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

The base structured datatype containing multi-part content of a message. A Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1Content

Returns a new instance of GoogleCloudAiplatformV1Content.



2947
2948
2949
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2947

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

Instance Attribute Details

#partsArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Part>

Required. Ordered Parts that constitute a single message. Parts may have different IANA MIME types. Corresponds to the JSON property parts



2938
2939
2940
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2938

def parts
  @parts
end

#roleString

Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. Corresponds to the JSON property role

Returns:

  • (String)


2945
2946
2947
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2945

def role
  @role
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2952
2953
2954
2955
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2952

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