Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class CachedContent.
A resource used in LLM queries for users to explicitly specify what to cache and how to cache.
Generated from protobuf message google.cloud.aiplatform.v1.CachedContent
Namespace
Google \ Cloud \ AIPlatform \ V1Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ expire_time |
Google\Protobuf\Timestamp
Timestamp of when this resource is considered expired. This is always provided on output, regardless of what was sent on input. |
↳ ttl |
Google\Protobuf\Duration
Input only. The TTL for this resource. The expiration time is computed: now + TTL. |
↳ name |
string
Immutable. Identifier. The server-generated resource name of the cached content Format: projects/{project}/locations/{location}/cachedContents/{cached_content} |
↳ display_name |
string
Optional. Immutable. The user-generated meaningful display name of the cached content. |
↳ model |
string
Immutable. The name of the publisher model to use for cached content. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} |
↳ system_instruction |
Content
Optional. Input only. Immutable. Developer set system instruction. Currently, text only |
↳ contents |
array<Content>
Optional. Input only. Immutable. The content to cache |
↳ tools |
array<Tool>
Optional. Input only. Immutable. A list of |
↳ tool_config |
ToolConfig
Optional. Input only. Immutable. Tool config. This config is shared for all tools |
↳ create_time |
Google\Protobuf\Timestamp
Output only. Creatation time of the cache entry. |
↳ update_time |
Google\Protobuf\Timestamp
Output only. When the cache entry was last updated in UTC time. |
↳ usage_metadata |
CachedContent\UsageMetadata
Output only. Metadata on the usage of the cached content. |
getExpireTime
Timestamp of when this resource is considered expired.
This is always provided on output, regardless of what was sent on input.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasExpireTime
setExpireTime
Timestamp of when this resource is considered expired.
This is always provided on output, regardless of what was sent on input.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getTtl
Input only. The TTL for this resource. The expiration time is computed: now + TTL.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Duration|null |
hasTtl
setTtl
Input only. The TTL for this resource. The expiration time is computed: now + TTL.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Duration
|
Returns | |
---|---|
Type | Description |
$this |
getName
Immutable. Identifier. The server-generated resource name of the cached content Format: projects/{project}/locations/{location}/cachedContents/{cached_content}
Returns | |
---|---|
Type | Description |
string |
setName
Immutable. Identifier. The server-generated resource name of the cached content Format: projects/{project}/locations/{location}/cachedContents/{cached_content}
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDisplayName
Optional. Immutable. The user-generated meaningful display name of the cached content.
Returns | |
---|---|
Type | Description |
string |
setDisplayName
Optional. Immutable. The user-generated meaningful display name of the cached content.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getModel
Immutable. The name of the publisher model to use for cached content.
Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model}
Returns | |
---|---|
Type | Description |
string |
setModel
Immutable. The name of the publisher model to use for cached content.
Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model}
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getSystemInstruction
Optional. Input only. Immutable. Developer set system instruction.
Currently, text only
Returns | |
---|---|
Type | Description |
Content|null |
hasSystemInstruction
clearSystemInstruction
setSystemInstruction
Optional. Input only. Immutable. Developer set system instruction.
Currently, text only
Parameter | |
---|---|
Name | Description |
var |
Content
|
Returns | |
---|---|
Type | Description |
$this |
getContents
Optional. Input only. Immutable. The content to cache
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setContents
Optional. Input only. Immutable. The content to cache
Parameter | |
---|---|
Name | Description |
var |
array<Content>
|
Returns | |
---|---|
Type | Description |
$this |
getTools
Optional. Input only. Immutable. A list of Tools
the model may use to
generate the next response
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setTools
Optional. Input only. Immutable. A list of Tools
the model may use to
generate the next response
Parameter | |
---|---|
Name | Description |
var |
array<Tool>
|
Returns | |
---|---|
Type | Description |
$this |
getToolConfig
Optional. Input only. Immutable. Tool config. This config is shared for all tools
Returns | |
---|---|
Type | Description |
ToolConfig|null |
hasToolConfig
clearToolConfig
setToolConfig
Optional. Input only. Immutable. Tool config. This config is shared for all tools
Parameter | |
---|---|
Name | Description |
var |
ToolConfig
|
Returns | |
---|---|
Type | Description |
$this |
getCreateTime
Output only. Creatation time of the cache entry.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasCreateTime
clearCreateTime
setCreateTime
Output only. Creatation time of the cache entry.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getUpdateTime
Output only. When the cache entry was last updated in UTC time.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. When the cache entry was last updated in UTC time.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getUsageMetadata
Output only. Metadata on the usage of the cached content.
Returns | |
---|---|
Type | Description |
CachedContent\UsageMetadata|null |
hasUsageMetadata
clearUsageMetadata
setUsageMetadata
Output only. Metadata on the usage of the cached content.
Parameter | |
---|---|
Name | Description |
var |
CachedContent\UsageMetadata
|
Returns | |
---|---|
Type | Description |
$this |
getExpiration
Returns | |
---|---|
Type | Description |
string |