import { PromptTemplate } from '@langchain/core/prompts'; import { BaseRetriever } from '@langchain/core/retrievers'; import { IGraphNode, RunnableConfig } from '../../../graphs'; import { LLMProvider } from '../../../types'; import { DataSetHelper } from '../services'; import { DbQueryState } from '../state'; import { QueryCacheMetadata } from '../types'; export declare class CheckCacheNode implements IGraphNode { private readonly cache; private readonly smartLLM; private readonly dataSetHelper; constructor(cache: BaseRetriever, smartLLM: LLMProvider, dataSetHelper: DataSetHelper); prompt: PromptTemplate\nYou are an expert Semantic analyser, you will be given a prompt from the user and a list of past prompts that were handled successfully, along with description of the sql generated from those prompts.\nYou need to return the most relevant prompt from the list and in which of the following ways is it relevant -\n- return 'as-is' if the prompt's result would contain the information the user is looking for without any changes in the result, and can be used as it is.\n- return 'similar' if the prompt's result would be similar to the question in the new prompt but not exactly, and can be modified to get the data user needs.\n- return 'not-relevant' if the prompt is not relevant to the new prompt at all.\nRemember that if the cached prompt has extra information, then still the old prompt could be considered exactly same as long as it does not contradict the new prompt.\n\n\n{prompt}\n\n\n{queries}\n\n\nformat -\nrelevant index-of-query-starting-from-1\nexamples -\nas-is 2\n\nsimilar 1\n\nnot-relevant\n\n\n\nDo not return any other text or explanation, just the output in the above format.\nIf no queries are relevant, return 'not-relevant' and nothing else.\n">, any>; execute(state: DbQueryState, config: RunnableConfig): Promise>; private _buildCacheLog; }