Skip to content

Commit

Permalink
remove undefined function from evals
Browse files Browse the repository at this point in the history
  • Loading branch information
Filip Michalsky committed Sep 24, 2024
1 parent 16dae22 commit 30966c9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions evals/index.eval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,8 @@ const google_jobs = async () => {
const tasks = { vanta, vanta_h, peeler_simple, peeler_complex, wikipedia, costar, google_jobs};


function logJsonl(message: any) {
console.log(JSON.stringify(message));
}

const exactMatch = (args: { input; output; expected? }) => {
logJsonl({ type: "result", task: args.input.name, output: args.output });
console.log(JSON.stringify({ type: "result", task: args.input.name, output: args.output }));

return {
name: "Exact match",
Expand All @@ -245,13 +241,13 @@ Eval("stagehand", {
try {
const result = await tasks[input.name](input);
if (result) {
logJsonl({ type: "status", task: input.name, status: "Passed ✅" });
console.log(JSON.stringify({ type: "status", task: input.name, status: "Passed ✅" }) );
} else {
logJsonl({ type: "status", task: input.name, status: "Failed ❌" });
console.log(JSON.stringify({ type: "status", task: input.name, status: "Failed ❌" }));
}
return result;
} catch (error) {
logJsonl({ type: "error", task: input.name, error: `Error ❌ - ${error.message}` });
console.log(JSON.stringify({ type: "error", task: input.name, error: `Error ❌ - ${error.message}` }));
return false;
}
},
Expand Down

0 comments on commit 30966c9

Please sign in to comment.