MCPcopy Create free account
hub / github.com/openai/plugins / buildBudgetBucket

Function buildBudgetBucket

plugins/plugin-eval/src/core/budget.js:17–31  ·  view source on GitHub ↗
(value, thresholds, components)

Source from the content-addressed store, hash-verified

15}
16
17function buildBudgetBucket(value, thresholds, components) {
18 const [goodMax, moderateMax, heavyMax] = thresholds;
19 const band =
20 value <= goodMax ? "good" : value <= moderateMax ? "moderate" : value <= heavyMax ? "heavy" : "excessive";
21 return {
22 value,
23 band,
24 thresholds: {
25 goodMax,
26 moderateMax,
27 heavyMax,
28 },
29 components,
30 };
31}
32
33async function gatherDeferredTextFiles(rootPath, excludeFiles = []) {
34 const files = await walkFiles(rootPath);

Callers 1

applyBudgetBandsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected