Uses of Record Class
com.tnsai.llm.cache.CacheEntry
Packages that use CacheEntry
Package
Description
LLM response caching with semantic similarity and prompt caching support.
-
Uses of CacheEntry in com.tnsai.llm.cache
Methods in com.tnsai.llm.cache that return CacheEntryModifier and TypeMethodDescriptionstatic CacheEntryCacheEntry.create(String id, String promptHash, float[] embedding, String originalPrompt, Optional<String> systemPrompt, String response) Creates a new cache entry with current timestamp.SemanticCache.SimilarityResult.entry()Returns the value of theentryrecord component.Stores a prompt-response pair in the cache.Stores a prompt-response pair with system prompt.CacheEntry.withAccess()Creates a copy with updated access time and hit count.Creates a copy with additional metadata.Methods in com.tnsai.llm.cache that return types with arguments of type CacheEntryModifier and TypeMethodDescriptionInMemorySemanticCache.findSimilar(String prompt, double minSimilarity) InMemorySemanticCache.findSimilar(String prompt, Optional<String> systemPrompt, double minSimilarity) SemanticCache.findSimilar(String prompt, double minSimilarity) Finds the most similar cached entry above the threshold.SemanticCache.findSimilar(String prompt, Optional<String> systemPrompt, double minSimilarity) Finds the most similar cached entry with system prompt consideration.Gets an entry by exact prompt hash.Constructors in com.tnsai.llm.cache with parameters of type CacheEntryModifierConstructorDescriptionSimilarityResult(CacheEntry entry, double similarity) Creates an instance of aSimilarityResultrecord class.