CacheConfig

org.llm4s.llmconnect.caching.CacheConfig
See theCacheConfig companion class
object CacheConfig

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def create(similarityThreshold: Double, ttl: FiniteDuration, maxSize: Int): Result[CacheConfig]

Constructs a validated CacheConfig.

Constructs a validated CacheConfig.

All constraints are checked together before returning; the resulting Left lists every violation separated by "; ".

Value parameters

maxSize

Must be strictly positive; defaults to 1 000.

similarityThreshold

Must be in [0.0, 1.0] inclusive.

ttl

Duration must be strictly positive.

Attributes

Returns

Right(config) when all constraints pass; Left(ValidationError) with all violations when any constraint fails.