import { Prompt, PrismaClient } from "@prisma/client"; import { Redis, Cluster } from "ioredis"; import { PromptParams, PartialPrompt, ResolvedPromptGraph, PromptResult } from "./types"; import { ParsedPromptDependencyTag } from "../../../features/prompts/parsePromptDependencyTags"; export declare const MAX_PROMPT_NESTING_DEPTH = 5; export declare class PromptService { private prisma; private redis; private metricIncrementer?; private cacheEnabled; private ttlSeconds; constructor(prisma: PrismaClient, redis: Redis | Cluster | null, metricIncrementer?: ((name: string, value?: number) => void) | undefined, cacheEnabled?: boolean); getPrompt(params: PromptParams): Promise; private getDbPrompt; resolvePrompt(prompt: Prompt | null): Promise; private shouldUseCache; private getCachedPrompt; private cachePrompt; /** * Lock the cache so reads will go to the database and not to Redis * * This is useful in order to return consistent data during the * invalidation of the cache where we are looping through the relevant cache keys */ lockCache(params: Pick): Promise; unlockCache(params: Pick): Promise; private isCacheLocked; private getLockKey; invalidateCache(params: Pick): Promise; private getCacheKey; private getCacheKeyPrefix; private getKeyIndexKey; buildAndResolvePromptGraph(params: { projectId: string; parentPrompt: PartialPrompt; dependencies?: ParsedPromptDependencyTag[]; }): Promise; private logError; private logInfo; private logDebug; private incrementMetric; } //# sourceMappingURL=index.d.ts.map