MCPcopy
hub / github.com/promptfoo/promptfoo / maybeLoadFromExternalFileWithVars

Function maybeLoadFromExternalFileWithVars

src/util/file.ts:415–421  ·  view source on GitHub ↗
(
  config: any,
  vars?: Record<string, VarValue>,
)

Source from the content-addressed store, hash-verified

413 * @returns The processed configuration with variables rendered and files loaded
414 */
415export function maybeLoadFromExternalFileWithVars(
416 config: any,
417 vars?: Record<string, VarValue>,
418): any {
419 const rendered = renderVarsInObject(config, vars);
420 return maybeLoadFromExternalFile(rendered);
421}
422
423/**
424 * Loads response_format configuration from an external file with variable rendering.

Callers 4

file.test.tsFile · 0.90
getOpenAiBodyMethod · 0.85
validateFunctionCallFunction · 0.85
getOpenAiBodyMethod · 0.85

Calls 2

renderVarsInObjectFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…