UNPKG

smart-ai-cache

Version:

🚀 Lightning-fast AI response caching with Redis support. Reduce OpenAI/Claude/Gemini API costs by 40-80% with sub-millisecond cache lookups.

10 lines (9 loc) • 528 B
import { GenerateContentRequest, GenerateContentResult } from '@google/generative-ai'; import { AIResponseCache } from '../core/cache.js'; import { CacheConfig } from '../core/types.js'; export declare class GoogleCache extends AIResponseCache { private googleAI; constructor(config?: CacheConfig, apiKey?: string); generateContent(params: GenerateContentRequest, modelName?: string): Promise<GenerateContentResult>; protected getCacheEntry(key: string): Promise<import("../core/types.js").CacheEntry | null>; }