File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -285,7 +285,9 @@ export async function runEval(
285285 // Upsert the local Evaluators; other Evaluators are just referenced by `path` or `id`
286286 let localEvaluators : [ EvaluatorResponse , Function ] [ ] = [ ] ;
287287 if ( evaluators ) {
288- const evaluatorsWithCallable = evaluators . filter ( ( e ) => e . callable !== null ) ;
288+ const evaluatorsWithCallable = evaluators . filter (
289+ ( e ) => e . callable !== undefined ,
290+ ) ;
289291
290292 if ( evaluatorsWithCallable . length > 0 && function_ == null ) {
291293 throw new Error (
Original file line number Diff line number Diff line change @@ -90,8 +90,10 @@ export interface Evaluator extends Identifiers {
9090 returnType ?: EvaluatorReturnTypeEnum ;
9191 /**The threshold to check the Evaluator against. If the aggregate value of the Evaluator is below this threshold, the check will fail.*/
9292 threshold ?: number ;
93- callable : Function ;
94- argsType : EvaluatorArgumentsType ;
93+ /**The function to run on the logs to produce the judgment - only required for local Evaluators.*/
94+ callable ?: Function ;
95+ /**The type of arguments the Evaluator expects - only required for local Evaluators.*/
96+ argsType ?: EvaluatorArgumentsType ;
9597}
9698
9799export interface TargetFreeEvaluator extends Evaluator {
You can’t perform that action at this time.
0 commit comments