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

Function buildPythonScriptArgs

src/providers/pythonCompletion.ts:34–43  ·  view source on GitHub ↗
(
  apiType: PythonApiType,
  prompt: string,
  optionsWithProcessedConfig: ProviderOptions,
  sanitizedContext: CallApiContextParams | undefined,
)

Source from the content-addressed store, hash-verified

32type PythonApiType = 'call_api' | 'call_embedding_api' | 'call_classification_api';
33
34function buildPythonScriptArgs(
35 apiType: PythonApiType,
36 prompt: string,
37 optionsWithProcessedConfig: ProviderOptions,
38 sanitizedContext: CallApiContextParams | undefined,
39) {
40 return apiType === 'call_api'
41 ? [prompt, optionsWithProcessedConfig, sanitizedContext]
42 : [prompt, optionsWithProcessedConfig];
43}
44
45function hasPythonResultProperty(
46 result: any,

Callers 1

executePythonScriptMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…