Skip to main content
Glama
Arize-ai

@arizeai/phoenix-mcp

Official
by Arize-ai
asEvaluatorFn.ts524 B
import { AnyFn, EvaluatorFn } from "../types"; import { isPromise } from "../utils/typeUtils"; import { toEvaluationResult } from "./toEvaluationResult"; /** * A function that converts a generic function into an evaluator function */ export function asEvaluatorFn<RecordType extends Record<string, unknown>>( fn: AnyFn ): EvaluatorFn<RecordType> { return async (...args) => { let result = fn(...args); if (isPromise(result)) { result = await result; } return toEvaluationResult(result); }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Arize-ai/phoenix'

If you have feedback or need assistance with the MCP directory API, please join our Discord server