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

Function renderBudgets

plugins/plugin-eval/src/renderers/markdown.js:39–61  ·  view source on GitHub ↗
(budgets)

Source from the content-addressed store, hash-verified

37}
38
39function renderBudgets(budgets) {
40 const lines = [
41 `- trigger_cost_tokens: ${budgets.trigger_cost_tokens.value} (${budgets.trigger_cost_tokens.band})`,
42 `- invoke_cost_tokens: ${budgets.invoke_cost_tokens.value} (${budgets.invoke_cost_tokens.band})`,
43 `- deferred_cost_tokens: ${budgets.deferred_cost_tokens.value} (${budgets.deferred_cost_tokens.band})`,
44 ];
45
46 if (budgets.explicit_only_invoke_cost_tokens) {
47 lines.push(
48 `- explicit_only_invoke_cost_tokens: ${budgets.explicit_only_invoke_cost_tokens.value} (${budgets.explicit_only_invoke_cost_tokens.band}, unscored)`,
49 );
50 }
51
52 lines.push(`- total_tokens: ${budgets.total_tokens.value} (${budgets.total_tokens.band})`);
53
54 if (budgets.invocation_policy?.explicit_only_skill_count > 0) {
55 lines.push(
56 `- invocation_policy: ${budgets.invocation_policy.implicit_skill_count} implicit skill(s), ${budgets.invocation_policy.explicit_only_skill_count} explicit-only skill(s)`,
57 );
58 }
59
60 return lines.join("\n");
61}
62
63function renderObservedUsage(observedUsage) {
64 if (!observedUsage) {

Callers 2

renderEvaluationFunction · 0.85
renderBudgetExplanationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected