MCPcopy Create free account
hub / github.com/developersdigest/llm-answer-engine / initializeSemanticCache

Function initializeSemanticCache

app/tools/semanticCache.tsx:26–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26export async function initializeSemanticCache() {
27 if (config.useSemanticCache) {
28 const index = new Index();
29 semanticCache = new SemanticCache({ index, minProximity: 0.95 });
30 }
31}
32export async function getFromSemanticCache(userMessage: string) {
33 if (semanticCache) {
34 return semanticCache.get(userMessage);

Callers 1

myActionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected