Vertex AI V1 API - Class Google::Cloud::AIPlatform::V1::GenerateContentRequest (v0.38.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

#model

def model() -> ::String
Returns
  • (::String) — Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*

#model=

def model=(value) -> ::String
Parameter
  • value (::String) — Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*
Returns
  • (::String) — Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*

#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

#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.