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

Method callApi

src/providers/pythonCompletion.ts:404–409  ·  view source on GitHub ↗
(prompt: string, context?: CallApiContextParams)

Source from the content-addressed store, hash-verified

402 }
403
404 async callApi(prompt: string, context?: CallApiContextParams): Promise<ProviderResponse> {
405 if (!this.isInitialized) {
406 await this.initialize();
407 }
408 return this.executePythonScript(prompt, context, 'call_api');
409 }
410
411 async callEmbeddingApi(prompt: string): Promise<ProviderEmbeddingResponse> {
412 if (!this.isInitialized) {

Callers

nothing calls this directly

Calls 2

initializeMethod · 0.95
executePythonScriptMethod · 0.95

Tested by

no test coverage detected