( apiType: PythonApiType, functionName: string, result: any, )
| 154 | } |
| 155 | |
| 156 | function validatePythonScriptResult( |
| 157 | apiType: PythonApiType, |
| 158 | functionName: string, |
| 159 | result: any, |
| 160 | ): void { |
| 161 | switch (apiType) { |
| 162 | case 'call_api': |
| 163 | validateCallApiResult(functionName, result); |
| 164 | return; |
| 165 | case 'call_embedding_api': |
| 166 | validateEmbeddingResult(functionName, result); |
| 167 | return; |
| 168 | case 'call_classification_api': |
| 169 | validateClassificationResult(functionName, result); |
| 170 | return; |
| 171 | default: |
| 172 | throw new Error(`Unsupported apiType: ${apiType}`); |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | export class PythonProvider implements ApiProvider { |
| 177 | config: PythonProviderConfig; |
no test coverage detected
searching dependent graphs…