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) • 522 B
import Anthropic from '@anthropic-ai/sdk'; import { AIResponseCache } from '../core/cache.js'; import { CacheConfig } from '../core/types.js'; export declare class AnthropicCache extends AIResponseCache { private anthropic; constructor(config?: CacheConfig, anthropicOptions?: ConstructorParameters<typeof Anthropic>[0]); messages(params: Anthropic.MessageCreateParamsNonStreaming): Promise<Anthropic.Message>; protected getCacheEntry(key: string): Promise<import("../core/types.js").CacheEntry | null>; }