Aggregated

A PromptCache.Factory implementation that aggregates multiple Factory.Named instances.

The Aggregated class provides a way to combine multiple named factories and attempts to create a PromptCache using the first factory that supports a given configuration.

Constructors

Link copied to clipboard
constructor(vararg factories: PromptCache.Factory.Named)

Secondary constructor for the Aggregated class.

constructor(factories: List<PromptCache.Factory.Named>)

Functions

Link copied to clipboard
open override fun create(config: String): PromptCache

Creates a new instance of PromptCache based on the provided configuration string.

Link copied to clipboard
open fun elements(config: String): List<String>

Splits the given configuration string into a list of elements using ':' as the primary delimiter, while correctly handling nested structures indicated by curly braces '{' and '}'.