Skip to content

CachePointBlock

Defined in: src/types/messages.ts:499

Cache point block for prompt caching. Marks a position in a message or system prompt where caching should occur.

new CachePointBlock(data): CachePointBlock;

Defined in: src/types/messages.ts:510

ParameterType
dataCachePointBlockData

CachePointBlock

readonly type: "cachePointBlock";

Defined in: src/types/messages.ts:503

Discriminator for cache point.


readonly cacheType: "default";

Defined in: src/types/messages.ts:508

The cache type. Currently only ‘default’ is supported.

CachePointBlockData.cacheType

toJSON(): {
cachePoint: CachePointBlockData;
};

Defined in: src/types/messages.ts:518

Serializes the CachePointBlock to a JSON-compatible ContentBlockData object. Called automatically by JSON.stringify().

{
cachePoint: CachePointBlockData;
}
NameTypeDefined in
cachePointCachePointBlockDatasrc/types/messages.ts:518
JSONSerializable.toJSON

static fromJSON(data): CachePointBlock;

Defined in: src/types/messages.ts:532

Creates a CachePointBlock instance from its wrapped data format.

ParameterTypeDescription
data{ cachePoint: CachePointBlockData; }Wrapped CachePointBlockData to deserialize
data.cachePointCachePointBlockData-

CachePointBlock

CachePointBlock instance