UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio

45 lines (44 loc) 2.11 kB
/** * @file This file exports the main Evaluator class, which serves as the central entry point for the evaluation system. */ import type { LanguageModelV3CallOptions } from "@ai-sdk/provider"; import type { EvaluationData, GenerateResult, AutoEvaluationConfig, EvaluationConfig } from "../types/index.js"; export * from "./errors/index.js"; export * from "./hooks/index.js"; export * from "./pipeline/index.js"; export * from "./reporting/index.js"; export * from "./scorers/index.js"; export { BatchEvaluator } from "./BatchEvaluator.js"; export { EvaluationAggregator } from "./EvaluationAggregator.js"; export { EvaluatorFactory, getEvaluatorFactory } from "./EvaluatorFactory.js"; export { EvaluatorRegistry, getEvaluatorRegistry, } from "./EvaluatorRegistry.js"; export { RAGASEvaluator } from "./ragasEvaluator.js"; export { RetryManager } from "./retryManager.js"; /** * A centralized class for performing response evaluations. It supports different * evaluation strategies, with RAGAS-style model-based evaluation as the default. * This class orchestrates the context building and evaluation process. */ export declare class Evaluator { private contextBuilder; private config; private ragasEvaluator; constructor(config?: EvaluationConfig); /** * The main entry point for performing an evaluation. It selects the evaluation * strategy based on the configuration and executes it. * * @param options The original `TextGenerationOptions` from the user request. * @param result The `GenerateResult` from the provider. * @returns A promise that resolves to the `EvaluationResult`. */ evaluate(options: LanguageModelV3CallOptions, result: GenerateResult, threshold: number, config: AutoEvaluationConfig): Promise<EvaluationData>; /** * Performs evaluation using the RAGAS-style model-based evaluator. * * @param options The original `TextGenerationOptions`. * @param result The `GenerateResult` to be evaluated. * @returns A promise that resolves to the `EvaluationResult`. */ private evaluateWithRAGAS; }