You've already forked DataMate
feat: enhance backend deployment, frontend file selection and synthesis task management (#129)
* feat: Implement data synthesis task management with database models and API endpoints * feat: Update Python version requirements and refine dependency constraints in configuration * fix: Correctly extract file values from selectedFilesMap in AddDataDialog * feat: Refactor synthesis task routes and enhance file task management in the API * feat: Enhance SynthesisTaskTab with tooltip actions and add chunk data retrieval in API
This commit is contained in:
37
frontend/src/pages/SynthesisTask/synthesis-api.ts
Normal file
37
frontend/src/pages/SynthesisTask/synthesis-api.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import { get, post, del } from "@/utils/request";
|
||||
|
||||
// 创建数据合成任务
|
||||
export function createSynthesisTaskUsingPost(data: unknown) {
|
||||
return post("/api/synthesis/gen/task", data);
|
||||
}
|
||||
|
||||
// 获取数据合成任务详情
|
||||
export function querySynthesisTaskByIdUsingGet(taskId: string) {
|
||||
return get(`/api/synthesis/gen/task/${taskId}`);
|
||||
}
|
||||
|
||||
// 分页查询数据合成任务列表
|
||||
export function querySynthesisTasksUsingGet(params: {
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
synthesis_type?: string;
|
||||
status?: string;
|
||||
name?: string;
|
||||
}) {
|
||||
return get(`/api/synthesis/gen/tasks`, params as any);
|
||||
}
|
||||
|
||||
// 删除整个数据合成任务
|
||||
export function deleteSynthesisTaskByIdUsingDelete(taskId: string) {
|
||||
return del(`/api/synthesis/gen/task/${taskId}`);
|
||||
}
|
||||
|
||||
// 分页查询某个任务下的文件任务列表
|
||||
export function querySynthesisFileTasksUsingGet(taskId: string, params: { page?: number; page_size?: number }) {
|
||||
return get(`/api/synthesis/gen/task/${taskId}/files`, params as any);
|
||||
}
|
||||
|
||||
// 获取不同合成类型对应的 Prompt
|
||||
export function getPromptByTypeUsingGet(synthType: string) {
|
||||
return get(`/api/synthesis/gen/prompt`, { synth_type: synthType } as any);
|
||||
}
|
||||
Reference in New Issue
Block a user