adk-typescript
Version:
TypeScript port of Google's Agent Development Kit (ADK)
41 lines (40 loc) • 1.81 kB
TypeScript
import type { LlmAgent } from '../agents/LlmAgent';
export declare enum EvalStatus {
PASSED = 1,
FAILED = 2,
NOT_EVALUATED = 3
}
export interface EvalMetric {
metricName: string;
threshold: number;
}
export interface EvalMetricResult {
score?: number;
evalStatus: EvalStatus;
}
export interface EvalResult {
evalSetFile: string;
evalId: string;
finalEvalStatus: EvalStatus;
evalMetricResults: Array<[EvalMetric, EvalMetricResult]>;
sessionId: string;
}
export declare const MISSING_EVAL_DEPENDENCIES_MESSAGE = "Eval module is not installed, please install via `npm install @google-cloud/aiplatform` or the appropriate package.";
export declare const TOOL_TRAJECTORY_SCORE_KEY = "tool_trajectory_avg_score";
export declare const RESPONSE_MATCH_SCORE_KEY = "response_match_score";
export declare const RESPONSE_EVALUATION_SCORE_KEY = "response_evaluation_score";
export declare const EVAL_SESSION_ID_PREFIX = "___eval___session___";
export declare const DEFAULT_CRITERIA: Record<string, number>;
export declare function getEvaluationCriteriaOrDefault(evalConfigFilePath?: string): Record<string, number>;
export declare function getRootAgent(agentModuleFilePath: string): LlmAgent;
export declare function tryGetResetFunc(agentModuleFilePath: string): any;
export declare function parseAndGetEvalsToRun(evalSetFilePaths: string[]): Record<string, string[]>;
export declare function runEvals({ evalSetToEvals, rootAgent, resetFunc, evalMetrics, sessionService, artifactService, printDetailedResults, }: {
evalSetToEvals: Record<string, string[]>;
rootAgent: LlmAgent;
resetFunc?: any;
evalMetrics: EvalMetric[];
sessionService?: any;
artifactService?: any;
printDetailedResults?: boolean;
}): AsyncGenerator<EvalResult, void, unknown>;