Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GenerateContentRequest

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

Overview

Request message for [PredictionService.GenerateContent].

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1GenerateContentRequest

Returns a new instance of GoogleCloudAiplatformV1beta1GenerateContentRequest.



8754
8755
8756
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 8754

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

Instance Attribute Details

#contentsArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content>

Required. Input content. Corresponds to the JSON property contents



8730
8731
8732
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 8730

def contents
  @contents
end

#endpointString

Required. The name of the Endpoint requested to serve the prediction. Format: projects/project/locations/location/endpoints/endpoint` Corresponds to the JSON propertyendpoint`

Returns:

  • (String)


8736
8737
8738
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 8736

def endpoint
  @endpoint
end

#generation_configGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GenerationConfig

Generation config. Corresponds to the JSON property generationConfig



8741
8742
8743
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 8741

def generation_config
  @generation_config
end

#safety_settingsArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SafetySetting>

Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates. Corresponds to the JSON property safetySettings



8747
8748
8749
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 8747

def safety_settings
  @safety_settings
end

#toolsArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Tool>

Optional. Tools that the model may use to generate response. Corresponds to the JSON property tools



8752
8753
8754
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 8752

def tools
  @tools
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8759
8760
8761
8762
8763
8764
8765
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 8759

def update!(**args)
  @contents = args[:contents] if args.key?(:contents)
  @endpoint = args[:endpoint] if args.key?(:endpoint)
  @generation_config = args[:generation_config] if args.key?(:generation_config)
  @safety_settings = args[:safety_settings] if args.key?(:safety_settings)
  @tools = args[:tools] if args.key?(:tools)
end