PromptCache
Interface for caching prompt execution results. Implementations should provide a way to store and retrieve prompt execution results.
Inheritors
Types
Functions
Link copied to clipboard
Get a cached response for a request, or null if not cached.
Link copied to clipboard
suspend fun PromptCache.get(prompt: Prompt, tools: List<ToolDescriptor>, clock: Clock = Clock.System): List<Message.Response>?
Get a cached response for a prompt with tools, or null if not cached.
Link copied to clipboard
Put a response in the cache for a request.
Link copied to clipboard
suspend fun PromptCache.put(prompt: Prompt, tools: List<ToolDescriptor>, response: List<Message.Response>)
Put a response in the cache for a prompt with tools.