Table of Contents

Class PromptCachePolicy

Namespace
JD.AI.Core.PromptCaching
Assembly
JD.AI.Core.dll

Applies platform-level prompt caching directives to execution settings.

public static class PromptCachePolicy
Inheritance
PromptCachePolicy
Inherited Members

Fields

EnabledExtensionKey

public const string EnabledExtensionKey = "jdai_prompt_cache_enabled"

Field Value

string

TtlExtensionKey

public const string TtlExtensionKey = "jdai_prompt_cache_ttl"

Field Value

string

Methods

Apply(PromptExecutionSettings, ProviderModelInfo?, ChatHistory, bool, PromptCacheTtl)

public static void Apply(PromptExecutionSettings settings, ProviderModelInfo? model, ChatHistory history, bool enabled, PromptCacheTtl ttl)

Parameters

settings PromptExecutionSettings
model ProviderModelInfo
history ChatHistory
enabled bool
ttl PromptCacheTtl

Apply(PromptExecutionSettings, string?, string?, ChatHistory, bool, PromptCacheTtl)

public static void Apply(PromptExecutionSettings settings, string? providerName, string? modelId, ChatHistory history, bool enabled, PromptCacheTtl ttl)

Parameters

settings PromptExecutionSettings
providerName string
modelId string
history ChatHistory
enabled bool
ttl PromptCacheTtl