Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1GroundedGenerationContent

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

Overview

Base structured datatype containing multi-part content of a message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1GroundedGenerationContent

Returns a new instance of GoogleCloudDiscoveryengineV1GroundedGenerationContent.



5888
5889
5890
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5888

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

Instance Attribute Details

#partsArray<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1GroundedGenerationContentPart>

Ordered Parts that constitute a single message. Corresponds to the JSON property parts



5880
5881
5882
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5880

def parts
  @parts
end

#roleString

Producer of the content. Must be either user or model. Intended to be used for multi-turn conversations. Otherwise, it can be left unset. Corresponds to the JSON property role

Returns:

  • (String)


5886
5887
5888
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5886

def role
  @role
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5893
5894
5895
5896
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5893

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