Named

abstract class Named(val name: String) : PromptCache.Factory(source)

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

This class is designed to be extended by concrete implementations that register themselves with a unique name, allowing them to support specific configurations. It provides a utility method to determine if the factory can handle a given configuration string based on its name.

Inheritors

Constructors

Link copied to clipboard
constructor(name: String)

Properties

Link copied to clipboard

The unique name associated with the factory.

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 '}'.

Link copied to clipboard
fun supports(config: String): Boolean