Class: Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1ModelInteraction

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

Interaction for generating the completion using models.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GenaiVertexV1beta1ModelInteraction

Returns a new instance of GenaiVertexV1beta1ModelInteraction.



4172
4173
4174
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4172

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

Instance Attribute Details

#cached_contentString

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` Corresponds to the JSON propertycached_content`

Returns:

  • (String)


4160
4161
4162
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4160

def cached_content
  @cached_content
end

#generation_configGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1GenerationConfig

Configuration parameters for model interactions. Corresponds to the JSON property generationConfig



4165
4166
4167
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4165

def generation_config
  @generation_config
end

#modelString

The name of the Model used for generating the completion. Corresponds to the JSON property model

Returns:

  • (String)


4170
4171
4172
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4170

def model
  @model
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4177
4178
4179
4180
4181
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4177

def update!(**args)
  @cached_content = args[:cached_content] if args.key?(:cached_content)
  @generation_config = args[:generation_config] if args.key?(:generation_config)
  @model = args[:model] if args.key?(:model)
end