d13100ebf3
Update draft releases / main (push) Has been cancelled
Build and push docs image / build-image (push) Has been cancelled
Build Web Application / build-web (macos-latest) (push) Has been cancelled
Build Web Application / build-web (ubuntu-latest) (push) Has been cancelled
Python Code Quality Checks / build (push) Has been cancelled
Test Python / test-python (macos-latest, 3.10) (push) Has been cancelled
Test Python / test-python (macos-latest, 3.11) (push) Has been cancelled
Test Python / test-python (ubuntu-latest, 3.10) (push) Has been cancelled
Test Python / test-python (ubuntu-latest, 3.11) (push) Has been cancelled
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,
|
|
},
|
|
});
|
|
};
|