You've already forked DataMate
feat(synthesis): add chunk-level synthesis data detail page & refine APIs/routing (#130)
* feat: implement synthesis data detail view with chunk selection and data display
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { get, post, del } from "@/utils/request";
|
||||
|
||||
// 创建数据合成任务
|
||||
export function createSynthesisTaskUsingPost(data: unknown) {
|
||||
return post("/api/synthesis/gen/task", data);
|
||||
export function createSynthesisTaskUsingPost(data: Record<string, unknown>) {
|
||||
return post("/api/synthesis/gen/task", data as unknown as Record<string, never>);
|
||||
}
|
||||
|
||||
// 获取数据合成任务详情
|
||||
@@ -18,7 +18,7 @@ export function querySynthesisTasksUsingGet(params: {
|
||||
status?: string;
|
||||
name?: string;
|
||||
}) {
|
||||
return get(`/api/synthesis/gen/tasks`, params as any);
|
||||
return get(`/api/synthesis/gen/tasks`, params);
|
||||
}
|
||||
|
||||
// 删除整个数据合成任务
|
||||
@@ -28,10 +28,20 @@ export function deleteSynthesisTaskByIdUsingDelete(taskId: string) {
|
||||
|
||||
// 分页查询某个任务下的文件任务列表
|
||||
export function querySynthesisFileTasksUsingGet(taskId: string, params: { page?: number; page_size?: number }) {
|
||||
return get(`/api/synthesis/gen/task/${taskId}/files`, params as any);
|
||||
return get(`/api/synthesis/gen/task/${taskId}/files`, params);
|
||||
}
|
||||
|
||||
// 根据文件任务 ID 分页查询 chunk 记录
|
||||
export function queryChunksByFileUsingGet(fileId: string, params: { page?: number; page_size?: number }) {
|
||||
return get(`/api/synthesis/gen/file/${fileId}/chunks`, params);
|
||||
}
|
||||
|
||||
// 根据 chunk ID 查询所有合成结果数据
|
||||
export function querySynthesisDataByChunkUsingGet(chunkId: string) {
|
||||
return get(`/api/synthesis/gen/chunk/${chunkId}/data`);
|
||||
}
|
||||
|
||||
// 获取不同合成类型对应的 Prompt
|
||||
export function getPromptByTypeUsingGet(synthType: string) {
|
||||
return get(`/api/synthesis/gen/prompt`, { synth_type: synthType } as any);
|
||||
return get(`/api/synthesis/gen/prompt`, { synth_type: synthType });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user