mirror of
https://github.com/csunny/DB-GPT.git
synced 2026-07-17 01:58:47 +00:00
Co-authored-by: yaoyifan-yyf <yaoyifan.yyf@antgroup.com> Co-authored-by: alan.cl <alan.cl@antgroup.com> Co-authored-by: iterminatorheart <123625928+iterminatorheart@users.noreply.github.com> Co-authored-by: VLADIMIR KOBZEV <vladimir.kobzev@improvado.io> Co-authored-by: Aries-ckt <916701291@qq.com> Co-authored-by: xiandu.wl <xiandu.wl@antgroup.com>
24 lines
752 B
TypeScript
24 lines
752 B
TypeScript
import type { createBenchmarkTaskRequest, getBenchmarkTaskListRequest } from '@/types/models_evaluation';
|
|
import { getUserId } from '@/utils';
|
|
import { GET, POST } from '../index';
|
|
|
|
const userId = getUserId();
|
|
|
|
//get benchmark task list
|
|
export const getBenchmarkTaskList = (data: getBenchmarkTaskListRequest) => {
|
|
return GET<getBenchmarkTaskListRequest, Record<string, any>>(`/api/v1/evaluate/benchmark_task_list`, data, {
|
|
headers: {
|
|
'user-id': userId,
|
|
},
|
|
});
|
|
};
|
|
|
|
// create benchmark task
|
|
export const createBenchmarkTask = (data: createBenchmarkTaskRequest) => {
|
|
return POST<createBenchmarkTaskRequest, Record<string, any>>(`/api/v1/evaluate/execute_benchmark_task`, data, {
|
|
headers: {
|
|
'user-id': userId,
|
|
},
|
|
});
|
|
};
|