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.



2612
2613
2614
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2612

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



2545
2546
2547
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2545

def contents
  @contents
end

#create_timeString

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

Returns:

  • (String)


2550
2551
2552
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2550

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)


2556
2557
2558
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2556

def display_name
  @display_name
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)


2562
2563
2564
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2562

def expire_time
  @expire_time
end

#modelString

Immutable. The name of the publisher model to use for cached content. Format: projects/project/locations/location/publishers/publisher/models/model Corresponds to the JSON property model

Returns:

  • (String)


2568
2569
2570
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2568

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)


2575
2576
2577
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2575

def name
  @name
end

#system_instructionGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1Content

The base structured datatype containing multi-part content of a message. A Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn. Corresponds to the JSON property systemInstruction



2583
2584
2585
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2583

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



2588
2589
2590
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2588

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



2594
2595
2596
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2594

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)


2600
2601
2602
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2600

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)


2605
2606
2607
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2605

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



2610
2611
2612
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2610

def 
  @usage_metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2617

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)
  @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