mirror of
https://github.com/promptfoo/promptfoo.git
synced 2023-08-15 01:10:51 +03:00
15 lines
251 B
TypeScript
15 lines
251 B
TypeScript
class CustomApiProvider {
|
|
id() {
|
|
return 'custom-api-provider';
|
|
}
|
|
|
|
async callApi(prompt) {
|
|
return {
|
|
output: 'Custom output',
|
|
tokenUsage: { total: 10, prompt: 5, completion: 5 },
|
|
};
|
|
}
|
|
}
|
|
|
|
export default CustomApiProvider;
|