CacheKeyGenerator

org.llm4s.llmconnect.caching.CacheKeyGenerator

Utility object for generating cache keys using secure hashing. Keys should be deterministic (same inputs always produce same key) and collision-resistant (different inputs shouldn't produce same key).

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def sha256(text: String, model: String): String

Generate a secure cache key using SHA-256 hashing.

Generate a secure cache key using SHA-256 hashing.

Value parameters

model

The model identifier

text

The input text to embed

Attributes

Returns

A 64-character hex string representing the hash