Factory

interface Factory(source)

Represents a factory interface for creating instances of PromptCache. Factories implementing this interface are designed to construct specific types of prompt caches based on a provided configuration string.

Inheritors

Types

Link copied to clipboard
Link copied to clipboard
abstract class Named(val name: String) : PromptCache.Factory

Represents an abstract factory with a specific name for creating PromptCache instances.

Functions

Link copied to clipboard
abstract 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 '}'.