CreateCachedContentConfig

@Serializable
data class CreateCachedContentConfig(val httpOptions: HttpOptions? = null, val ttl: Duration? = null, val expireTime: Instant? = null, val displayName: String? = null, val contents: List<Content>? = null, val systemInstruction: Content? = null, val tools: List<Tool>? = null, val toolConfig: ToolConfig? = null, val kmsKeyName: String? = null)

Optional configuration for cached content creation.

Constructors

Link copied to clipboard
constructor(httpOptions: HttpOptions? = null, ttl: Duration? = null, expireTime: Instant? = null, displayName: String? = null, contents: List<Content>? = null, systemInstruction: Content? = null, tools: List<Tool>? = null, toolConfig: ToolConfig? = null, kmsKeyName: String? = null)

Properties

Link copied to clipboard
val contents: List<Content>? = null

The content to cache.

Link copied to clipboard
val displayName: String? = null

The user-generated meaningful display name of the cached content.

Link copied to clipboard
@Serializable(with = InstantSerializer::class)
val expireTime: Instant? = null

Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z.

Link copied to clipboard

Used to override HTTP request options.

Link copied to clipboard
val kmsKeyName: String? = null

The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. The key needs to be in the same region as where the compute resource is created. See https://cloud.google.com/vertex-ai/docs/general/cmek for more details. If this is set, then all created CachedContent objects will be encrypted with the provided encryption key. Allowed formats: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}

Link copied to clipboard

Developer set system instruction.

Link copied to clipboard
val toolConfig: ToolConfig? = null

Configuration for the tools to use. This config is shared for all tools.

Link copied to clipboard
val tools: List<Tool>? = null

A list of Tools the model may use to generate the next response.

Link copied to clipboard
@Serializable(with = DurationStringSerializer::class)
val ttl: Duration? = null

The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: "3.5s".