Class: Google::Cloud::AIPlatform::V1::GenerateContentRequest

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/aiplatform/v1/prediction_service.rb

Overview

Request message for [PredictionService.GenerateContent].

Defined Under Namespace

Classes: LabelsEntry

Instance Attribute Summary collapse

Instance Attribute Details

#cached_content::String

Returns Optional. The name of the cached content used as context to serve the prediction. Note: only used in explicit caching, where users can have control over caching (e.g. what content to cache) and enjoy guaranteed cost savings. Format: projects/{project}/locations/{location}/cachedContents/{cachedContent}.

Returns:

  • (::String)

    Optional. The name of the cached content used as context to serve the prediction. Note: only used in explicit caching, where users can have control over caching (e.g. what content to cache) and enjoy guaranteed cost savings. Format: projects/{project}/locations/{location}/cachedContents/{cachedContent}



557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 557

class GenerateContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#contents::Array<::Google::Cloud::AIPlatform::V1::Content>

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



557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 557

class GenerateContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#generation_config::Google::Cloud::AIPlatform::V1::GenerationConfig

Returns Optional. Generation config.

Returns:



557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 557

class GenerateContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#labels::Google::Protobuf::Map{::String => ::String}

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



557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 557

class GenerateContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#model::String

Returns 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}



557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 557

class GenerateContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#model_armor_config::Google::Cloud::AIPlatform::V1::ModelArmorConfig

Returns Optional. Settings for prompt and response sanitization using the Model Armor service. If supplied, safety_settings must not be supplied.

Returns:



557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 557

class GenerateContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#safety_settings::Array<::Google::Cloud::AIPlatform::V1::SafetySetting>

Returns Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.

Returns:



557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 557

class GenerateContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#system_instruction::Google::Cloud::AIPlatform::V1::Content

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



557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 557

class GenerateContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#tool_config::Google::Cloud::AIPlatform::V1::ToolConfig

Returns Optional. Tool config. This config is shared for all tools provided in the request.

Returns:



557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 557

class GenerateContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#tools::Array<::Google::Cloud::AIPlatform::V1::Tool>

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



557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'proto_docs/google/cloud/aiplatform/v1/prediction_service.rb', line 557

class GenerateContentRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end