@arizeai/phoenix-client
Version:
A client for the Phoenix API
18 lines • 695 B
JavaScript
import { asExperimentEvaluator } from "./asExperimentEvaluator.js";
/**
* A function that acts as a bridge, converting phoenix-evals to be experiment evaluator compatible
* @param phoenixEvaluator
* @returns an experiment compatible Evaluator
*/
export function fromPhoenixLLMEvaluator(phoenixLLMEvaluator) {
return asExperimentEvaluator({
name: phoenixLLMEvaluator.name,
kind: "LLM",
evaluate: (example) => {
// For now blindly coerce the types
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return phoenixLLMEvaluator.evaluate(example);
},
});
}
//# sourceMappingURL=fromPhoenixLLMEvaluator.js.map