Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CachedContent

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

Overview

A resource used in LLM queries for users to explicitly specify what to cache and how to cache.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1CachedContent

Returns a new instance of GoogleCloudAiplatformV1CachedContent.



3419
3420
3421
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3419

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

Instance Attribute Details

#contentsArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content>

Optional. Input only. Immutable. The content to cache Corresponds to the JSON property contents



3346
3347
3348
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3346

def contents
  @contents
end

#create_timeString

Output only. Creation time of the cache entry. Corresponds to the JSON property createTime

Returns:

  • (String)


3351
3352
3353
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3351

def create_time
  @create_time
end

#display_nameString

Optional. Immutable. The user-generated meaningful display name of the cached content. Corresponds to the JSON property displayName

Returns:

  • (String)


3357
3358
3359
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3357

def display_name
  @display_name
end

#encryption_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1EncryptionSpec

Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. Corresponds to the JSON property encryptionSpec



3363
3364
3365
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3363

def encryption_spec
  @encryption_spec
end

#expire_timeString

Timestamp of when this resource is considered expired. This is always provided on output, regardless of what was sent on input. Corresponds to the JSON property expireTime

Returns:

  • (String)


3369
3370
3371
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3369

def expire_time
  @expire_time
end

#modelString

Immutable. The name of the Model to use for cached content. Currently, only the published Gemini base models are supported, in form of projects/PROJECT/ locations/LOCATION/publishers/google/models/MODEL Corresponds to the JSON property model

Returns:

  • (String)


3376
3377
3378
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3376

def model
  @model
end

#nameString

Immutable. Identifier. The server-generated resource name of the cached content Format: projects/project/locations/location/cachedContents/ cached_content Corresponds to the JSON property name

Returns:

  • (String)


3383
3384
3385
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3383

def name
  @name
end

#system_instructionGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1Content

The structured data content of a message. A Content message contains a role field, which indicates the producer of the content, and a parts field, which contains the multi-part data of the message. Corresponds to the JSON property systemInstruction



3390
3391
3392
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3390

def system_instruction
  @system_instruction
end

#tool_configGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1ToolConfig

Tool config. This config is shared for all tools provided in the request. Corresponds to the JSON property toolConfig



3395
3396
3397
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3395

def tool_config
  @tool_config
end

#toolsArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Tool>

Optional. Input only. Immutable. A list of Tools the model may use to generate the next response Corresponds to the JSON property tools



3401
3402
3403
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3401

def tools
  @tools
end

#ttlString

Input only. The TTL for this resource. The expiration time is computed: now + TTL. Corresponds to the JSON property ttl

Returns:

  • (String)


3407
3408
3409
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3407

def ttl
  @ttl
end

#update_timeString

Output only. When the cache entry was last updated in UTC time. Corresponds to the JSON property updateTime

Returns:

  • (String)


3412
3413
3414
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3412

def update_time
  @update_time
end

#usage_metadataGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1CachedContentUsageMetadata

Metadata on the usage of the cached content. Corresponds to the JSON property usageMetadata



3417
3418
3419
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3417

def 
  @usage_metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3424

def update!(**args)
  @contents = args[:contents] if args.key?(:contents)
  @create_time = args[:create_time] if args.key?(:create_time)
  @display_name = args[:display_name] if args.key?(:display_name)
  @encryption_spec = args[:encryption_spec] if args.key?(:encryption_spec)
  @expire_time = args[:expire_time] if args.key?(:expire_time)
  @model = args[:model] if args.key?(:model)
  @name = args[:name] if args.key?(:name)
  @system_instruction = args[:system_instruction] if args.key?(:system_instruction)
  @tool_config = args[:tool_config] if args.key?(:tool_config)
  @tools = args[:tools] if args.key?(:tools)
  @ttl = args[:ttl] if args.key?(:ttl)
  @update_time = args[:update_time] if args.key?(:update_time)
  @usage_metadata = args[:usage_metadata] if args.key?(:usage_metadata)
end