Vertex AI V1 API - Class Google::Cloud::AIPlatform::V1::Content (v0.39.0)

Reference documentation and code samples for the Vertex AI V1 API class Google::Cloud::AIPlatform::V1::Content.

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.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#parts

def parts() -> ::Array<::Google::Cloud::AIPlatform::V1::Part>
Returns

#parts=

def parts=(value) -> ::Array<::Google::Cloud::AIPlatform::V1::Part>
Parameter
Returns

#role

def role() -> ::String
Returns
  • (::String) — 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.

#role=

def role=(value) -> ::String
Parameter
  • value (::String) — 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.

Returns
  • (::String) — 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.