UNPKG

pulse-ai-utils

Version:

Utility functions and helpers for AI-powered applications

29 lines (28 loc) 821 B
export interface CacheParams { area: string; region?: string; country?: string; timeline?: string; buttonClickCount?: string; lat?: number; lng?: number; radius?: number; } export default class QueryCache { /** * Get cached results in batches for streaming */ getCachedResultsBatch(prompt: string, location: CacheParams, batchSize?: number, lastScore?: number): Promise<Array<{ data: any[]; score: number; }>>; getCachedResult(prompt: string, location: CacheParams): Promise<any | null>; setCachedResult(prompt: string, location: CacheParams, result: any, options?: { model?: string; provider?: string; }): Promise<void>; /** * Generate a short hash of a string for ID generation */ private hashString; }