Skip to main content
Version: 4.7.28

Evaluators - Get multiple

Get evaluators for a given pipeline with getEvaluators().

Example

typescript
import { init, getEvaluators } from "@gentrace/core";
async function main() {
init({
apiKey: process.env.GENTRACE_API_KEY ?? ""
});
// example pipeline slug
const pipelineSlug = "compose";
const evaluatorsFromSlug = await getEvaluators(pipelineSlug);
console.log(evaluatorsFromSlug);
// example pipeline ID
const pipelineId = "2c97ffc2-4fd0-5188-8f77-88ab8e2de3b5";
const evaluatorsFromId = await getEvaluators(pipelineId);
console.log(evaluatorsFromId);
// get evaluator templates
const evaluatorsTemplates = await getEvaluators(null);
console.log(evaluatorsTemplates);
}
main();

Arguments

pipelineIdentifier: string

Return value

Array of Evaluator objects.

Learn about the typing of the return value on this API page.