import { PromptTemplate } from '@langchain/core/prompts'; import { LLMProvider } from '../../../types'; import { DatabaseSchema, QueryTemplate, QueryTemplateMetadata, TemplatePlaceholder } from '../types'; import { RunnableConfig } from '../../../graphs'; type ResolvedTemplate = { sql: string; description: string; }; export declare class TemplateHelper { private readonly llm; constructor(llm: LLMProvider); extractionPrompt: PromptTemplate\nYou are an expert at extracting parameter values from natural language prompts.\nGiven a user prompt, a SQL template, and a list of placeholders with their descriptions and types, extract the value for each placeholder from the prompt.\nFor sql_expression placeholders, generate a valid SQL fragment that fits the position of the placeholder in the template.\n\n\n{prompt}\n\n\n{template}\n\n\n{placeholders}\n\n\nReturn each extracted value as an XML tag where the tag name is the placeholder name.\nIf a placeholder value cannot be determined from the prompt, use the default value if provided, or leave the tag empty.\n\nRules per type:\n- string: Return the raw value only, without any surrounding quotes. Example: Acme Corp\n- number: Return the numeric value only. Example: 10\n- boolean: Return true or false. Example: true\n- sql_expression: Return a complete, valid SQL fragment with proper SQL syntax including quotes where needed. Example: created_at > '2024-01-01'\n\nDo not return any other text or explanation, just the XML tags.\n">, any>; extractPlaceholderValues(placeholders: TemplatePlaceholder[], prompt: string, sqlTemplate: string, config: RunnableConfig, schema?: DatabaseSchema): Promise>; private _getColumnContext; private _getRelevantContextEntries; private _parseXmlValues; resolveTemplate(template: QueryTemplate, prompt: string, config: RunnableConfig, schema?: DatabaseSchema, templateFetcher?: (id: string) => Promise, depth?: number): Promise; private _resolveTemplateRefs; private _substitutePlaceholders; private _formatValue; private _isTruthy; private _escapeRegex; parseTemplateMetadata(metadata: QueryTemplateMetadata): QueryTemplate; } export {};