CachedContent class final
Content that has been preprocessed and can be used in subsequent request to GenerativeService.
Cached content can be only used with model it was created for.
- Inheritance
-
- Object
- ProtoMessage
- CachedContent
Constructors
-
CachedContent({Timestamp? expireTime, Duration? ttl, String? name, String? displayName, required String? model, Content? systemInstruction, List<
Content> contents = const [], List<Tool> tools = const [], ToolConfig? toolConfig, Timestamp? createTime, Timestamp? updateTime, CachedContent_UsageMetadata? usageMetadata}) -
CachedContent.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
contents
→ List<
Content> -
Optional. Input only. Immutable. The content to cache.
final
- createTime → Timestamp?
-
Output only. Creation time of the cache entry.
final
- displayName → String?
-
Optional. Immutable. The user-generated meaningful display name of the
cached content. Maximum 128 Unicode characters.
final
- expireTime → Timestamp?
-
Timestamp in UTC of when this resource is considered expired.
This is always provided on output, regardless of what was sent
on input.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- model → String?
-
Required. Immutable. The name of the
Modelto use for cached content Format:models/{model}final - name → String?
-
Output only. Identifier. The resource name referring to the cached content.
Format:
cachedContents/{id}final - qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- systemInstruction → Content?
-
Optional. Input only. Immutable. Developer set system instruction.
Currently text only.
final
- toolConfig → ToolConfig?
-
Optional. Input only. Immutable. Tool config. This config is shared for all
tools.
final
-
tools
→ List<
Tool> -
Optional. Input only. Immutable. A list of
Toolsthe model may use to generate the next responsefinal - ttl → Duration?
-
Input only. New TTL for this resource, input only.
final
- updateTime → Timestamp?
-
Output only. When the cache entry was last updated in UTC time.
final
- usageMetadata → CachedContent_UsageMetadata?
-
Output only. Metadata on the usage of the cached content.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object -
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String