MCPcopy Index your code
hub / github.com/promptfoo/promptfoo / createProvider

Function createProvider

test/python/windows-path.test.ts:24–33  ·  view source on GitHub ↗
(scriptName: string, scriptContent: string)

Source from the content-addressed store, hash-verified

22 const providers: PythonProvider[] = [];
23
24 const createProvider = (scriptName: string, scriptContent: string) => {
25 const scriptPath = path.join(tempDir, scriptName);
26 fs.writeFileSync(scriptPath, scriptContent);
27 const provider = new PythonProvider(scriptPath, {
28 id: `python:${scriptName}`,
29 config: { basePath: tempDir },
30 });
31 providers.push(provider);
32 return provider;
33 };
34
35 beforeAll(async () => {
36 // Reset Python state

Callers 1

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…