Vertex AI V1 API - Class Google::Cloud::AIPlatform::V1::GenerateContentRequest (v0.58.0)

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

Request message for [PredictionService.GenerateContent].

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#contents

def contents() -> ::Array<::Google::Cloud::AIPlatform::V1::Content>
Returns
  • (::Array<::Google::Cloud::AIPlatform::V1::Content>) — Required. The content of the current conversation with the model.

    For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.

#contents=

def contents=(value) -> ::Array<::Google::Cloud::AIPlatform::V1::Content>
Parameter
  • value (::Array<::Google::Cloud::AIPlatform::V1::Content>) — Required. The content of the current conversation with the model.

    For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.

Returns
  • (::Array<::Google::Cloud::AIPlatform::V1::Content>) — Required. The content of the current conversation with the model.

    For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.

#generation_config

def generation_config() -> ::Google::Cloud::AIPlatform::V1::GenerationConfig
Returns

#generation_config=

def generation_config=(value) -> ::Google::Cloud::AIPlatform::V1::GenerationConfig
Parameter
Returns

#labels

def labels() -> ::Google::Protobuf::Map{::String => ::String}
Returns
  • (::Google::Protobuf::Map{::String => ::String}) — Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only.

    Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.

#labels=

def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}
Parameter
  • value (::Google::Protobuf::Map{::String => ::String}) — Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only.

    Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.

Returns
  • (::Google::Protobuf::Map{::String => ::String}) — Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only.

    Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.

#model

def model() -> ::String
Returns
  • (::String) — Required. The fully qualified name of the publisher model or tuned model endpoint to use.

    Publisher model format: projects/{project}/locations/{location}/publishers/*/models/*

    Tuned model endpoint format: projects/{project}/locations/{location}/endpoints/{endpoint}

#model=

def model=(value) -> ::String
Parameter
  • value (::String) — Required. The fully qualified name of the publisher model or tuned model endpoint to use.

    Publisher model format: projects/{project}/locations/{location}/publishers/*/models/*

    Tuned model endpoint format: projects/{project}/locations/{location}/endpoints/{endpoint}

Returns
  • (::String) — Required. The fully qualified name of the publisher model or tuned model endpoint to use.

    Publisher model format: projects/{project}/locations/{location}/publishers/*/models/*

    Tuned model endpoint format: projects/{project}/locations/{location}/endpoints/{endpoint}

#safety_settings

def safety_settings() -> ::Array<::Google::Cloud::AIPlatform::V1::SafetySetting>
Returns

#safety_settings=

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

#system_instruction

def system_instruction() -> ::Google::Cloud::AIPlatform::V1::Content
Returns
  • (::Google::Cloud::AIPlatform::V1::Content) — Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph.

#system_instruction=

def system_instruction=(value) -> ::Google::Cloud::AIPlatform::V1::Content
Parameter
  • value (::Google::Cloud::AIPlatform::V1::Content) — Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph.
Returns
  • (::Google::Cloud::AIPlatform::V1::Content) — Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph.

#tool_config

def tool_config() -> ::Google::Cloud::AIPlatform::V1::ToolConfig
Returns

#tool_config=

def tool_config=(value) -> ::Google::Cloud::AIPlatform::V1::ToolConfig
Parameter
Returns

#tools

def tools() -> ::Array<::Google::Cloud::AIPlatform::V1::Tool>
Returns
  • (::Array<::Google::Cloud::AIPlatform::V1::Tool>) — Optional. A list of Tools the model may use to generate the next response.

    A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.

#tools=

def tools=(value) -> ::Array<::Google::Cloud::AIPlatform::V1::Tool>
Parameter
  • value (::Array<::Google::Cloud::AIPlatform::V1::Tool>) — Optional. A list of Tools the model may use to generate the next response.

    A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.

Returns
  • (::Array<::Google::Cloud::AIPlatform::V1::Tool>) — Optional. A list of Tools the model may use to generate the next response.

    A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.