完成文档类型增删改查

This commit is contained in:
2025-04-11 18:45:03 +08:00
parent d54d0f25c6
commit 8177b4195f
18 changed files with 3298 additions and 371 deletions
+3 -3
View File
@@ -20,7 +20,7 @@ export interface PromptTemplate {
export interface PromptTemplateUI {
id: string;
template_name: string;
template_type: 'Extraction' | 'Evaluation' | 'Summary' | 'Common';
template_type: 'LLM_Extraction' | 'VLM_Extraction' | 'Evaluation' | 'Summary' | 'Common';
description: string;
template_content: string;
variables: Record<string, string>; // 变量定义
@@ -112,7 +112,7 @@ export function convertToUITemplate(template: PromptTemplate): PromptTemplateUI
return {
id: template.id ? template.id.toString() : '',
template_name: template.template_name,
template_type: template.template_type as "Extraction" | "Evaluation" | "Summary" | "Common",
template_type: template.template_type as "LLM_Extraction" | "VLM_Extraction" | "Evaluation" | "Summary" | "Common",
description: template.description || '',
template_content: template.template_content,
variables: template.variables,
@@ -207,7 +207,7 @@ export async function getPromptTemplates(searchParams: PromptSearchParams = {}):
return { error: '获取提示词模板数据失败', status: 500 };
}
console.log(`成功获取${extractedData.length}条提示词模板数据`);
// console.log(`成功获取${extractedData.length}条提示词模板数据`);
// 从响应头中获取总数
let totalCount = 0;