agsamantha/node_modules/langsmith/dist/evaluation/langchain.d.ts

22 lines
833 B
TypeScript
Raw Normal View History

2024-10-02 15:15:21 -05:00
import { type LoadEvaluatorOptions } from "langchain/evaluation";
import type { Run, Example } from "../schemas.js";
/**
* @deprecated Use `evaluate` instead.
*
* This utility function loads a LangChain string evaluator and returns a function
* which can be used by newer `evaluate` function.
*
* @param type Type of string evaluator, one of "criteria" or "labeled_criteria
* @param options Options for loading the evaluator
* @returns Evaluator consumable by `evaluate`
*/
export declare function getLangchainStringEvaluator(type: "criteria" | "labeled_criteria", options: LoadEvaluatorOptions & {
formatEvaluatorInputs?: (run: Run, example: Example) => {
prediction: string;
reference?: string;
input?: string;
};
}): Promise<(run: Run, example: Example) => Promise<{
key: string;
}>>;