@dooor-ai/toolkit
Version:
Guards, Evals & Observability for AI applications - works seamlessly with LangChain/LangGraph
29 lines • 876 B
TypeScript
import { EvalResult, EvalConfig } from "../core/types";
/**
* Abstract base class for all evals
*/
export declare abstract class Eval {
protected config: EvalConfig;
constructor(config?: EvalConfig);
/**
* Get the name of this eval
*/
abstract get name(): string;
/**
* Evaluate the LLM response
* @param input - The input that was sent to the LLM
* @param output - The output from the LLM
* @param metadata - Additional metadata (e.g., latency, tokens, cost)
* @returns EvalResult with score and pass/fail
*/
abstract evaluate(input: string, output: string, metadata?: Record<string, any>): Promise<EvalResult> | EvalResult;
/**
* Check if this eval is enabled
*/
isEnabled(): boolean;
/**
* Get the threshold
*/
getThreshold(): number;
}
//# sourceMappingURL=base.d.ts.map