diff --git a/src/eval_utils/run.ts b/src/eval_utils/run.ts index 608ed3f6..5cdf6be2 100644 --- a/src/eval_utils/run.ts +++ b/src/eval_utils/run.ts @@ -285,7 +285,9 @@ export async function runEval( // Upsert the local Evaluators; other Evaluators are just referenced by `path` or `id` let localEvaluators: [EvaluatorResponse, Function][] = []; if (evaluators) { - const evaluatorsWithCallable = evaluators.filter((e) => e.callable !== null); + const evaluatorsWithCallable = evaluators.filter( + (e) => e.callable !== undefined, + ); if (evaluatorsWithCallable.length > 0 && function_ == null) { throw new Error( diff --git a/src/eval_utils/types.ts b/src/eval_utils/types.ts index 3a0f2308..f954fe8f 100644 --- a/src/eval_utils/types.ts +++ b/src/eval_utils/types.ts @@ -90,8 +90,10 @@ export interface Evaluator extends Identifiers { returnType?: EvaluatorReturnTypeEnum; /**The threshold to check the Evaluator against. If the aggregate value of the Evaluator is below this threshold, the check will fail.*/ threshold?: number; - callable: Function; - argsType: EvaluatorArgumentsType; + /**The function to run on the logs to produce the judgment - only required for local Evaluators.*/ + callable?: Function; + /**The type of arguments the Evaluator expects - only required for local Evaluators.*/ + argsType?: EvaluatorArgumentsType; } export interface TargetFreeEvaluator extends Evaluator {