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

Function computeDeferredComponents

plugins/plugin-eval/src/core/budget.js:40–55  ·  view source on GitHub ↗
(rootPath, excludeFiles = [])

Source from the content-addressed store, hash-verified

38}
39
40async function computeDeferredComponents(rootPath, excludeFiles = []) {
41 const files = await gatherDeferredTextFiles(rootPath, excludeFiles);
42 const components = [];
43 for (const filePath of files) {
44 const content = await readText(filePath);
45 components.push(
46 createComponent(
47 relativePath(rootPath, filePath),
48 filePath,
49 estimateTokenCount(content),
50 "Deferred supporting file",
51 ),
52 );
53 }
54 return components;
55}
56
57async function readInvocationPolicy(rootPath) {
58 const policyPath = path.join(rootPath, "agents", "openai.yaml");

Callers 2

computeSkillBudgetFunction · 0.85
computePluginBudgetFunction · 0.85

Calls 5

readTextFunction · 0.90
relativePathFunction · 0.90
estimateTokenCountFunction · 0.90
gatherDeferredTextFilesFunction · 0.85
createComponentFunction · 0.85

Tested by

no test coverage detected