/** * Bench - Main benchmarking class for PraisonAI Bench TypeScript * * This module provides the core benchmarking functionality using agents * to evaluate LLM performance across different tasks and models. */ import { TestResult } from './agent'; import { ProviderName } from './providers'; import { CostSummary } from './cost-tracker'; export interface BenchConfig { default_model?: string; default_provider?: ProviderName; output_format?: 'json' | 'csv'; save_results?: boolean; output_dir?: string; max_retries?: number; timeout?: number; } export interface TestConfig { name?: string; prompt: string; model?: string; language?: string; expected?: string; } export interface TestSuiteConfig { config?: Record; tests: TestConfig[]; } export interface BenchSummary { total_tests: number; successful_tests: number; failed_tests: number; success_rate: string; models_tested: string[]; average_execution_time: string; timestamp: string; cost_summary?: CostSummary; } export interface BenchResult extends TestResult { evaluation?: Record; language?: string; } /** * Main benchmarking class that orchestrates agents for comprehensive LLM testing. */ export declare class Bench { private results; private config; private costTracker; private pluginManager; constructor(config?: BenchConfig, enableEvaluation?: boolean); /** * Detect language from response or test configuration. */ private detectLanguage; /** * Run a single benchmark test. */ runSingleTest(prompt: string, model?: string, testName?: string, expected?: string, language?: string): Promise; /** * Run a complete test suite from a YAML or JSON file. */ runTestSuite(testFile: string, testFilter?: string, defaultModel?: string, _concurrent?: number): Promise; /** * Run the same test across multiple models for comparison. */ runCrossModelTest(prompt: string, models?: string[]): Promise; /** * Save benchmark results to file. */ saveResults(filename?: string, format?: 'json' | 'csv'): string | null; private saveResultsCsv; /** * Generate HTML report from results. */ generateReport(outputPath?: string): string | null; /** * Get a summary of benchmark results including costs. */ getSummary(): BenchSummary; /** * Get all results. */ getResults(): BenchResult[]; /** * Clear all results. */ clearResults(): void; } //# sourceMappingURL=bench.d.ts.map