CachedPromptExecutor

A CodePromptExecutor that caches responses from a nested executor.

Parameters

cache

The cache implementation to use

nested

The nested executor to use for cache misses

Constructors

Link copied to clipboard
constructor(cache: PromptCache, nested: PromptExecutor)

Functions

Link copied to clipboard
open suspend override fun execute(prompt: Prompt, model: LLModel): String
open suspend override fun execute(prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>): List<Message.Response>
Link copied to clipboard
open suspend override fun executeStreaming(prompt: Prompt, model: LLModel): Flow<String>