mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-01 20:09:21 +00:00
v4.6.2-alpah (#511)
This commit is contained in:
@@ -5,7 +5,8 @@ export const defaultApp: AppDetailType = {
|
||||
_id: '',
|
||||
userId: 'userId',
|
||||
name: '模型加载中',
|
||||
type: 'basic',
|
||||
type: 'simple',
|
||||
simpleTemplateId: 'fastgpt-universal',
|
||||
avatar: '/icon/logo.svg',
|
||||
intro: '',
|
||||
updateTime: Date.now(),
|
||||
@@ -26,26 +27,6 @@ export const defaultOutLinkForm: OutLinkEditType = {
|
||||
}
|
||||
};
|
||||
|
||||
/* module special */
|
||||
export enum SystemInputEnum {
|
||||
'welcomeText' = 'welcomeText',
|
||||
'variables' = 'variables',
|
||||
'switch' = 'switch', // a trigger switch
|
||||
'history' = 'history',
|
||||
'userChatInput' = 'userChatInput',
|
||||
'questionGuide' = 'questionGuide',
|
||||
'tts' = 'tts',
|
||||
isResponseAnswerText = 'isResponseAnswerText'
|
||||
}
|
||||
export enum SystemOutputEnum {
|
||||
finish = 'finish'
|
||||
}
|
||||
|
||||
export enum VariableInputEnum {
|
||||
input = 'input',
|
||||
select = 'select'
|
||||
}
|
||||
|
||||
export enum TTSTypeEnum {
|
||||
none = 'none',
|
||||
web = 'web',
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
export enum ContextExtractEnum {
|
||||
extractKeys = 'extractKeys',
|
||||
content = 'content',
|
||||
description = 'description',
|
||||
success = 'success',
|
||||
failed = 'failed',
|
||||
fields = 'fields'
|
||||
}
|
||||
|
||||
export enum HttpPropsEnum {
|
||||
url = 'url',
|
||||
failed = 'failed'
|
||||
}
|
@@ -1,74 +0,0 @@
|
||||
import type { BoxProps } from '@chakra-ui/react';
|
||||
import { FlowNodeTypeEnum, FlowNodeValTypeEnum } from '@fastgpt/global/core/module/node/constant';
|
||||
|
||||
export const FlowValueTypeStyle: Record<`${FlowNodeValTypeEnum}`, BoxProps> = {
|
||||
[FlowNodeValTypeEnum.string]: {
|
||||
background: '#36ADEF'
|
||||
},
|
||||
[FlowNodeValTypeEnum.number]: {
|
||||
background: '#FB7C3C'
|
||||
},
|
||||
[FlowNodeValTypeEnum.boolean]: {
|
||||
background: '#E7D118'
|
||||
},
|
||||
[FlowNodeValTypeEnum.chatHistory]: {
|
||||
background: '#00A9A6'
|
||||
},
|
||||
[FlowNodeValTypeEnum.datasetQuote]: {
|
||||
background: '#A558C9'
|
||||
},
|
||||
[FlowNodeValTypeEnum.any]: {
|
||||
background: '#9CA2A8'
|
||||
}
|
||||
};
|
||||
export const FlowValueTypeTip = {
|
||||
[FlowNodeValTypeEnum.string]: {
|
||||
label: 'app.module.valueType.string',
|
||||
example: ''
|
||||
},
|
||||
[FlowNodeValTypeEnum.number]: {
|
||||
label: 'app.module.valueType.number',
|
||||
example: ''
|
||||
},
|
||||
[FlowNodeValTypeEnum.boolean]: {
|
||||
label: 'app.module.valueType.boolean',
|
||||
example: ''
|
||||
},
|
||||
[FlowNodeValTypeEnum.chatHistory]: {
|
||||
label: 'app.module.valueType.chatHistory',
|
||||
example: `{
|
||||
obj: System | Human | AI;
|
||||
value: string;
|
||||
}`
|
||||
},
|
||||
[FlowNodeValTypeEnum.datasetQuote]: {
|
||||
label: 'app.module.valueType.datasetQuote',
|
||||
example: `{
|
||||
id: string;
|
||||
datasetId: string;
|
||||
collectionId: string;
|
||||
sourceName: string;
|
||||
sourceId?: string;
|
||||
q: string;
|
||||
a: string
|
||||
}`
|
||||
},
|
||||
[FlowNodeValTypeEnum.any]: {
|
||||
label: 'app.module.valueType.any',
|
||||
example: ''
|
||||
}
|
||||
};
|
||||
|
||||
export const initModuleType: Record<string, boolean> = {
|
||||
[FlowNodeTypeEnum.historyNode]: true,
|
||||
[FlowNodeTypeEnum.questionInput]: true,
|
||||
[FlowNodeTypeEnum.pluginInput]: true
|
||||
};
|
||||
|
||||
export const edgeOptions = {
|
||||
style: {
|
||||
strokeWidth: 1.5,
|
||||
stroke: '#5A646Es'
|
||||
}
|
||||
};
|
||||
export const connectionLineStyle = { strokeWidth: 1.5, stroke: '#5A646Es' };
|
@@ -1,28 +0,0 @@
|
||||
import type { FlowNodeInputItemType } from '@fastgpt/global/core/module/node/type.d';
|
||||
import { SystemInputEnum } from '../app';
|
||||
import {
|
||||
FlowNodeInputTypeEnum,
|
||||
FlowNodeValTypeEnum
|
||||
} from '@fastgpt/global/core/module/node/constant';
|
||||
|
||||
export const Input_Template_TFSwitch: FlowNodeInputItemType = {
|
||||
key: SystemInputEnum.switch,
|
||||
type: FlowNodeInputTypeEnum.target,
|
||||
label: '触发器',
|
||||
valueType: FlowNodeValTypeEnum.any
|
||||
};
|
||||
|
||||
export const Input_Template_History: FlowNodeInputItemType = {
|
||||
key: SystemInputEnum.history,
|
||||
type: FlowNodeInputTypeEnum.target,
|
||||
label: '聊天记录',
|
||||
valueType: FlowNodeValTypeEnum.chatHistory
|
||||
};
|
||||
|
||||
export const Input_Template_UserChatInput: FlowNodeInputItemType = {
|
||||
key: SystemInputEnum.userChatInput,
|
||||
type: FlowNodeInputTypeEnum.target,
|
||||
label: '用户问题',
|
||||
required: true,
|
||||
valueType: FlowNodeValTypeEnum.string
|
||||
};
|
@@ -1,15 +0,0 @@
|
||||
import type { FlowNodeOutputItemType } from '@fastgpt/global/core/module/node/type';
|
||||
import { SystemOutputEnum } from '../app';
|
||||
import {
|
||||
FlowNodeOutputTypeEnum,
|
||||
FlowNodeValTypeEnum
|
||||
} from '@fastgpt/global/core/module/node/constant';
|
||||
|
||||
export const Output_Template_Finish: FlowNodeOutputItemType = {
|
||||
key: SystemOutputEnum.finish,
|
||||
label: '模块调用结束',
|
||||
description: '模块调用结束时触发',
|
||||
valueType: FlowNodeValTypeEnum.boolean,
|
||||
type: FlowNodeOutputTypeEnum.source,
|
||||
targets: []
|
||||
};
|
Reference in New Issue
Block a user