import type { AtomicTestCase, CompletedPrompt, EvaluateResult, EvaluateSummaryV3, EvaluateSummaryV2, EvaluateTable, Prompt, ResultsFile, UnifiedConfig } from '../types';
import EvalResult from './evalResult';
export declare function createEvalId(createdAt?: Date): string;
export declare class EvalQueries {
    static getVarsFromEvals(evals: Eval[]): Promise<Record<string, string[]>>;
}
export default class Eval {
    id: string;
    createdAt: number;
    author?: string;
    description?: string;
    config: Partial<UnifiedConfig>;
    results: EvalResult[];
    datasetId?: string;
    prompts: CompletedPrompt[];
    oldResults?: EvaluateSummaryV2;
    persisted: boolean;
    static latest(): Promise<Eval | undefined>;
    static findById(id: string): Promise<Eval | undefined>;
    static getMany(limit?: number): Promise<Eval[]>;
    static create(config: Partial<UnifiedConfig>, renderedPrompts: Prompt[], // The config doesn't contain the actual prompts, so we need to pass them in separately
    opts?: {
        id?: string;
        createdAt?: Date;
        author?: string;
        results?: EvalResult[];
    }): Promise<Eval>;
    constructor(config: Partial<UnifiedConfig>, opts?: {
        id?: string;
        createdAt?: Date;
        author?: string;
        description?: string;
        prompts?: CompletedPrompt[];
        datasetId?: string;
        persisted?: boolean;
    });
    version(): 3 | 4;
    useOldResults(): boolean;
    setTable(table: EvaluateTable): void;
    save(): Promise<void>;
    getVars(): Promise<string[]>;
    getPrompts(): {
        provider: string;
        raw: string;
        label: string;
        function?: ((args_0: {
            vars: Record<string, any>;
            provider?: import("../types").ApiProvider | undefined;
        }, ...args: unknown[]) => Promise<any>) | undefined;
        id?: string | undefined;
        config?: any;
        display?: string | undefined;
        metrics?: {
            cost: number;
            tokenUsage: {
                cached?: number | undefined;
                completion?: number | undefined;
                prompt?: number | undefined;
                total?: number | undefined;
                numRequests?: number | undefined;
            };
            score: number;
            testPassCount: number;
            testFailCount: number;
            testErrorCount: number;
            assertPassCount: number;
            assertFailCount: number;
            totalLatencyMs: number;
            namedScores: Record<string, number>;
            namedScoresCount: Record<string, number>;
            redteam?: {
                pluginPassCount: Record<string, number>;
                pluginFailCount: Record<string, number>;
                strategyPassCount: Record<string, number>;
                strategyFailCount: Record<string, number>;
            } | undefined;
        } | undefined;
    }[];
    getTable(): Promise<EvaluateTable>;
    addResult(result: EvaluateResult, test: AtomicTestCase): Promise<void>;
    fetchResultsBatched(batchSize?: number): AsyncGenerator<EvalResult[], void, unknown>;
    fetchResultsByTestIdx(testIdx: number): Promise<EvalResult[]>;
    addPrompts(prompts: CompletedPrompt[]): Promise<void>;
    addResults(results: EvalResult[]): Promise<void>;
    loadResults(): Promise<void>;
    getResults(): Promise<EvaluateResult[] | EvalResult[]>;
    toEvaluateSummary(): Promise<EvaluateSummaryV3 | EvaluateSummaryV2>;
    toResultsFile(): Promise<ResultsFile>;
    delete(): Promise<void>;
}
export declare function getSummaryOfLatestEvals(limit?: number, filterDescription?: string, datasetId?: string): Promise<{
    evalId: string;
    createdAt: number;
    description: string | null;
    numTests: number;
    datasetId: string | null;
    isRedteam: boolean;
}[]>;
//# sourceMappingURL=eval.d.ts.map