UNPKG

@nomyx/assistant

Version:

A powerful assistant library and cli for your AI projects. works with Vertex AI (Claude and Gemini)

14 lines (13 loc) 591 B
import { SemanticCacheEntry, SemanticCacheManager } from "../types/cache"; import { EmbeddingProvider } from "../types/provider"; export declare class SemanticCacheManagerImpl implements SemanticCacheManager { private cache; private embeddingProvider; constructor(embeddingProvider: EmbeddingProvider); get(key: string): Promise<any>; set(key: string, value: any, ttl?: number): Promise<void>; delete(key: string): Promise<void>; clear(): Promise<void>; search(query: string, threshold: number): Promise<SemanticCacheEntry[]>; private cosineSimilarity; }