oh-my-promptfoo 1.33.0 → 1.33.1
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/dist/assertions.cjs +10 -0
- package/dist/assertions.cjs.map +1 -1
- package/dist/assertions.d.cts +9 -0
- package/dist/assertions.d.ts +9 -0
- package/dist/assertions.js +10 -0
- package/dist/assertions.js.map +1 -1
- package/dist/providers.js +1 -1
- package/package.json +1 -1
package/dist/assertions.cjs
CHANGED
|
@@ -1391,6 +1391,14 @@ const filesystemReadTools = /* @__PURE__ */ new Set([
|
|
|
1391
1391
|
"read",
|
|
1392
1392
|
"read_file"
|
|
1393
1393
|
]);
|
|
1394
|
+
const noGraderUsage = {
|
|
1395
|
+
total: 0,
|
|
1396
|
+
prompt: 0,
|
|
1397
|
+
completion: 0,
|
|
1398
|
+
cached: 0,
|
|
1399
|
+
numRequests: 0,
|
|
1400
|
+
cost: 0
|
|
1401
|
+
};
|
|
1394
1402
|
const catReadOption = /^(?:-[AbeEnstTuv]+|--(?:show-all|number-nonblank|show-ends|number|squeeze-blank|show-tabs|show-nonprinting))$/;
|
|
1395
1403
|
function catReadsFile(args, filename) {
|
|
1396
1404
|
let optionsEnded = false;
|
|
@@ -1431,6 +1439,7 @@ function fileRead(_output, context) {
|
|
|
1431
1439
|
pass: true,
|
|
1432
1440
|
score: 1,
|
|
1433
1441
|
reason: direct ? `Read ${filename}` : `Successful Bash call contained a cat read of ${filename}`,
|
|
1442
|
+
tokensUsed: { ...noGraderUsage },
|
|
1434
1443
|
metadata: { matchedCallIds: [call.id] }
|
|
1435
1444
|
};
|
|
1436
1445
|
}
|
|
@@ -1438,6 +1447,7 @@ function fileRead(_output, context) {
|
|
|
1438
1447
|
pass: false,
|
|
1439
1448
|
score: 0,
|
|
1440
1449
|
reason: `No successful read of ${filename}`,
|
|
1450
|
+
tokensUsed: { ...noGraderUsage },
|
|
1441
1451
|
metadata: {}
|
|
1442
1452
|
};
|
|
1443
1453
|
} catch (cause) {
|