@wix/evalforge-evaluator 0.89.0 → 0.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +20 -1
- package/build/index.js.map +2 -2
- package/build/index.mjs +20 -1
- package/build/index.mjs.map +2 -2
- package/package.json +5 -5
package/build/index.js
CHANGED
|
@@ -249,6 +249,12 @@ function applyParamsToAssertion(assertion, params) {
|
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
|
+
if (assertion.type === "time_limit" && params.maxDurationMs !== void 0) {
|
|
253
|
+
return {
|
|
254
|
+
...assertion,
|
|
255
|
+
maxDurationMs: params.maxDurationMs
|
|
256
|
+
};
|
|
257
|
+
}
|
|
252
258
|
if (assertion.type === "skill_was_called" && params.skillNames !== void 0) {
|
|
253
259
|
return {
|
|
254
260
|
...assertion,
|
|
@@ -274,6 +280,18 @@ function resolveSystemAssertion(assertionId, params) {
|
|
|
274
280
|
expectedExitCode: params?.expectedExitCode ?? void 0
|
|
275
281
|
};
|
|
276
282
|
break;
|
|
283
|
+
case "time_limit":
|
|
284
|
+
baseAssertion = {
|
|
285
|
+
type: "time_limit",
|
|
286
|
+
maxDurationMs: params?.maxDurationMs ?? 3e5
|
|
287
|
+
};
|
|
288
|
+
break;
|
|
289
|
+
case "cost":
|
|
290
|
+
baseAssertion = {
|
|
291
|
+
type: "cost",
|
|
292
|
+
maxCostUsd: params?.maxCostUsd ?? 1
|
|
293
|
+
};
|
|
294
|
+
break;
|
|
277
295
|
case "llm_judge":
|
|
278
296
|
baseAssertion = {
|
|
279
297
|
type: "llm_judge",
|
|
@@ -2538,7 +2556,8 @@ async function runScenario(config, evalRunId2, scenario, evalData, template, res
|
|
|
2538
2556
|
fileDiffs: partialResult.fileDiffs?.map((d) => ({
|
|
2539
2557
|
path: d.path,
|
|
2540
2558
|
status: templateFilesMap.get(d.path)
|
|
2541
|
-
}))
|
|
2559
|
+
})),
|
|
2560
|
+
durationMs: partialResult.duration
|
|
2542
2561
|
};
|
|
2543
2562
|
const { "x-wix-ai-gateway-stream": _stream, ...judgeHeaders } = config.aiGatewayHeaders;
|
|
2544
2563
|
const defaultJudgeModel = import_evalforge_types6.DEFAULT_JUDGE_MODEL;
|