fix: 修改评查点设置中的多模态抽取设置的逻辑。
This commit is contained in:
@@ -47,14 +47,15 @@ type PostActionType = 'none' | 'manual' | 'replace';
|
||||
interface ExtactionConfigType {
|
||||
llm: {
|
||||
fields: string[];
|
||||
prompt_setting: PromptSetting;
|
||||
prompt_setting: LLMPromptSetting;
|
||||
};
|
||||
vlm: {
|
||||
fields: Array<{
|
||||
name: string;
|
||||
type: VLMFieldType; // 多模态字段类型 默认、货币、打印、印章、骑缝章、英文、数字、手写
|
||||
type: VLMFieldType; // 多模态字段类型 默认、货币、打印、印章、骑缝章、英文、数字、手写、自定义
|
||||
template?: string; // 自定义类型的提示词模板(仅当 type 为 custom 时使用)
|
||||
}>;
|
||||
prompt_setting: PromptSetting;
|
||||
prompt_setting: VLMPromptSetting;
|
||||
};
|
||||
regex: {
|
||||
fields: Array<{
|
||||
@@ -67,20 +68,33 @@ interface ExtactionConfigType {
|
||||
/**
|
||||
* VLM字段类型定义
|
||||
*/
|
||||
type VLMFieldType = 'default' | 'currency' | 'print' | 'seal' | 'cross-seal' | 'english' | 'number' | 'handwriting';
|
||||
type VLMFieldType = 'vlm_default_prompt' | 'vlm_currency_prompt' | 'vlm_print_prompt' | 'vlm_seal_prompt' | 'vlm_acrossPageSeal_prompt' | 'vlm_english_prompt' | 'vlm_number_prompt' | 'vlm_handwriting_prompt' | 'custom';
|
||||
|
||||
/**
|
||||
* 提示配置类型定义
|
||||
* llm提示配置类型定义
|
||||
*/
|
||||
interface PromptSetting {
|
||||
type: PromptType; // "system" or "custom" 如果为 "custom" 则为自定义提示
|
||||
interface LLMPromptSetting {
|
||||
type: LLMPromptType; // "llm_default_prompt" or "custom" 如果为 "custom" 则为自定义提示
|
||||
template: string; // 提示模板
|
||||
}
|
||||
|
||||
/**
|
||||
* 提示类型定义
|
||||
* vlm提示配置类型定义
|
||||
*/
|
||||
type PromptType = 'system' | 'custom';
|
||||
interface VLMPromptSetting {
|
||||
type: VLMPromptType; // "vlm_default_prompt" or "custom" 如果为 "custom" 则为自定义提示
|
||||
template: string; // 提示模板
|
||||
}
|
||||
|
||||
/**
|
||||
* llm提示类型定义
|
||||
*/
|
||||
type LLMPromptType = 'llm_default_prompt' | 'custom';
|
||||
|
||||
/**
|
||||
* llm提示类型定义
|
||||
*/
|
||||
type VLMPromptType = 'vlm_default_prompt' | 'custom';
|
||||
|
||||
/**
|
||||
* 评查配置类型定义
|
||||
@@ -200,19 +214,26 @@ export const EVALUATION_OPTIONS = {
|
||||
|
||||
// VLM字段类型选项
|
||||
vlmFieldTypeOptions: [
|
||||
{ value: 'default', label: '默认' },
|
||||
{ value: 'currency', label: '货币' },
|
||||
{ value: 'print', label: '打印' },
|
||||
{ value: 'seal', label: '印章' },
|
||||
{ value: 'cross-seal', label: '骑缝章' },
|
||||
{ value: 'english', label: '英文' },
|
||||
{ value: 'number', label: '数字' },
|
||||
{ value: 'handwriting', label: '手写' }
|
||||
{ value: 'vlm_default_prompt', label: '默认' },
|
||||
{ value: 'vlm_currency_prompt', label: '货币' },
|
||||
{ value: 'vlm_print_prompt', label: '打印' },
|
||||
{ value: 'vlm_seal_prompt', label: '印章' },
|
||||
{ value: 'vlm_acrossPageSeal_prompt', label: '骑缝章' },
|
||||
{ value: 'vlm_english_prompt', label: '英文' },
|
||||
{ value: 'vlm_number_prompt', label: '数字' },
|
||||
{ value: 'vlm_handwriting_prompt', label: '手写' },
|
||||
{ value: 'custom', label: '自定义' }
|
||||
],
|
||||
|
||||
// 提示类型选项
|
||||
promptTypeOptions: [
|
||||
{ value: 'system', label: '使用系统默认提示词' },
|
||||
// vlm提示词类型选项
|
||||
vlmPromptTypeOptions: [
|
||||
{ value: 'vlm_default_prompt', label: '使用系统默认提示词' },
|
||||
{ value: 'custom', label: '使用自定义提示词' }
|
||||
],
|
||||
|
||||
// llm提示词类型选项
|
||||
llmPromptTypeOptions: [
|
||||
{ value: 'llm_default_prompt', label: '使用系统默认提示词' },
|
||||
{ value: 'custom', label: '使用自定义提示词' }
|
||||
],
|
||||
|
||||
@@ -291,9 +312,10 @@ export type {
|
||||
SuggestionMessageType,
|
||||
PostActionType,
|
||||
ExtactionConfigType,
|
||||
VLMPromptSetting,
|
||||
VLMFieldType,
|
||||
PromptSetting,
|
||||
PromptType,
|
||||
LLMPromptSetting,
|
||||
LLMPromptType,
|
||||
EvaluationConfigType,
|
||||
LogicType,
|
||||
Rule,
|
||||
|
||||
Reference in New Issue
Block a user