UNPKG

@wavequery/conductor

Version:
30 lines (29 loc) 881 B
import { MetricResult, SQLMetric } from "./evaluation"; import { TextToSQLService } from "./sql"; export interface SQLTestCase { id: string; description: string; question: string; context: any; query: string; results?: any[]; metadata?: Record<string, any>; } export interface EvaluationResult { testCase: SQLTestCase; metrics: Record<string, MetricResult | Promise<MetricResult>>; duration: number; error?: Error; } export interface EvaluationOptions { metrics: SQLMetric[]; timeout?: number; parallel?: boolean; } export declare class SQLEvaluationRunner { private service; private options; constructor(service: TextToSQLService, options: EvaluationOptions); evaluateTestCase(testCase: SQLTestCase): Promise<EvaluationResult>; evaluateTestSuite(testCases: SQLTestCase[]): Promise<EvaluationResult[]>; }