ERROR:
Custom function threw error: Cannot read properties of undefined (reading 'arguments')
Stack Trace: TypeError: Cannot read properties of undefined (reading 'arguments')
at eval (eval at handleJavascript (/Users/tomvleminckx/.npm/_npx/81bbc6515d992ace/node_modules/promptfoo/dist/src/assertions/javascript.js:49:36),
:3:38)
at handleJavascript (/Users/tomvleminckx/.npm/_npx/81bbc6515d992ace/node_modules/promptfoo/dist/src/assertions/javascript.js:50:43)
at runAssertion (/Users/tomvleminckx/.npm/_npx/81bbc6515d992ace/node_modules/promptfoo/dist/src/assertions/index.js:313:30)
at /Users/tomvleminckx/.npm/_npx/81bbc6515d992ace/node_modules/promptfoo/dist/src/assertions/index.js:360:30
at /Users/tomvleminckx/.npm/_npx/81bbc6515d992ace/node_modules/promptfoo/node_modules/async/dist/async.js:151:38
at replenish (/Users/tomvleminckx/.npm/_npx/81bbc6515d992ace/node_modules/promptfoo/node_modules/async/dist/async.js:447:21)
at iterateeCallback (/Users/tomvleminckx/.npm/_npx/81bbc6515d992ace/node_modules/promptfoo/node_modules/async/dist/async.js:431:21)
at /Users/tomvleminckx/.npm/_npx/81bbc6515d992ace/node_modules/promptfoo/node_modules/async/dist/async.js:328:20
at invokeCallback (/Users/tomvleminckx/.npm/_npx/81bbc6515d992ace/node_modules/promptfoo/node_modules/async/dist/async.js:182:13)
at /Users/tomvleminckx/.npm/_npx/81bbc6515d992ace/node_modules/promptfoo/node_modules/async/dist/async.js:174:13
JSON.parse(output[0].function.arguments).issue_date.value === "2025-08-25"
{"type":"tool_use","id":"toolu_01LjkyRza6ZPLHxe5GJyCKgW","name":"extract_document_data","input":{"issue_date":{"value":"2025-08-25","coordinates":{"x":339,"y":314,"width":142,"height":17,"page_number":1}},"ca_type":{"value":"Takeover","coordinates":{"x":340,"y":548,"width":84,"height":14,"page_number":1}}}}
Show less
Tokens: 11,680 (11,501+179)
Latency: 4,513 ms
Tokens/Sec: 40
Cost: $0.037