V4.12.3 features (#5595)
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* refactor: remove ModelProviderIdType and update related types (#5549) * perf: model provider * fix eval create split (#5570) * git rebase --continuedoc * add more variable types (#5540) * variable types * password * time picker * internal var * file * fix-test * time select default value & range * password & type render * fix * fix build * fix * move method * split date select * icon * perf: variable code * prompt editor add markdown plugin (#5556) * editor markdown * fix build * pnpm lock * add props * update code * fix list * editor ui * fix variable reset (#5586) * perf: variables type code * customize lexical indent (#5588) * perf: multiple selector * perf: tab plugin * doc * refactor: update workflow constants to use ToolTypeEnum (#5491) * refactor: replace FlowNodeTemplateTypeEnum with string literals in workflow templates * perf: tool type --------- Co-authored-by: archer <545436317@qq.com> * update doc * fix: make table's row more natural while dragging it (#5596) * feat: add APIGetTemplate function and refactor template fetching logic (#5498) * feat: add APIGetTemplate function and refactor template fetching logic * chore: adjust the code * chore: update sdk --------- Co-authored-by: FinleyGe <m13203533462@163.com> * perf init system * doc * remove log * remove i18n * perf: variables render --------- Co-authored-by: Ctrlz <143257420+ctrlz526@users.noreply.github.com> Co-authored-by: heheer <heheer@sealos.io> Co-authored-by: 伍闲犬 <whoeverimf5@gmail.com> Co-authored-by: FinleyGe <m13203533462@163.com>
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: 'V4.12.0(包含升级脚本)'
|
||||
description: 'FastGPT V4.12.0 更新说明, 发布于 2025-8-11。'
|
||||
description: 'FastGPT V4.12.0 更新说明, 发布于 2025-8-11'
|
||||
---
|
||||
|
||||
## 更新指南
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: 'V4.12.1(包含升级脚本)'
|
||||
description: 'FastGPT V4.12.1 更新说明, 发布于 2025-8-18。'
|
||||
description: 'FastGPT V4.12.1 更新说明, 发布于 2025-8-18'
|
||||
---
|
||||
|
||||
## 更新指南
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: 'V4.12.2'
|
||||
description: 'FastGPT V4.12.2 更新说明, 发布于 2025-8-26。'
|
||||
description: 'FastGPT V4.12.2 更新说明, 发布于 2025-8-26'
|
||||
---
|
||||
|
||||
## 更新指南
|
||||
|
|
|
|||
|
|
@ -3,13 +3,16 @@ title: 'V4.12.3(进行中)'
|
|||
description: 'FastGPT V4.12.3 更新说明'
|
||||
---
|
||||
|
||||
|
||||
## 🚀 新增内容
|
||||
|
||||
1. 提示词编辑器支持列表、tab 渲染等部分富文本交互。
|
||||
2. 应用增加更多全局变量:密码、多选、内部变量(在站内对话不会显示)。
|
||||
|
||||
## ⚙️ 优化
|
||||
|
||||
1. 纠正 RRF 权重合并算法,使用标准 RRF 权重公式。
|
||||
2. 多选组件支持动态宽度计算,适配可见 tag。
|
||||
3. 变量更新组件渲染优化,与全局变量渲染保持一致性。
|
||||
|
||||
## 🐛 修复
|
||||
|
||||
|
|
@ -17,5 +20,10 @@ description: 'FastGPT V4.12.3 更新说明'
|
|||
2. 工作流文件上传默认打开,但输入侧未添加文件输出。
|
||||
3. 连续用户选择,分支无法正常运行。
|
||||
4. 工作流,变量更新,数组选择器异常。
|
||||
5. 应用评测,评测内容仅获取了首个输出文本,未获取所有输出文本。
|
||||
|
||||
## 🔨 工具更新
|
||||
## 🔨 插件更新
|
||||
|
||||
1. 系统工具类型迁移至 plugin。
|
||||
2. 将模型提供商配置移动到 plugin,实现热更新。
|
||||
3. 将应用模板移动至 plugin。
|
||||
|
|
@ -102,10 +102,10 @@
|
|||
"document/content/docs/upgrading/4-10/4101.mdx": "2025-08-02T19:38:37+08:00",
|
||||
"document/content/docs/upgrading/4-11/4110.mdx": "2025-08-05T23:20:39+08:00",
|
||||
"document/content/docs/upgrading/4-11/4111.mdx": "2025-08-07T22:49:09+08:00",
|
||||
"document/content/docs/upgrading/4-12/4120.mdx": "2025-08-12T22:45:19+08:00",
|
||||
"document/content/docs/upgrading/4-12/4121.mdx": "2025-08-15T22:53:06+08:00",
|
||||
"document/content/docs/upgrading/4-12/4122.mdx": "2025-09-04T21:37:57+08:00",
|
||||
"document/content/docs/upgrading/4-12/4123.mdx": "2025-09-04T21:37:57+08:00",
|
||||
"document/content/docs/upgrading/4-12/4120.mdx": "2025-09-04T22:59:41+08:00",
|
||||
"document/content/docs/upgrading/4-12/4121.mdx": "2025-09-04T22:59:41+08:00",
|
||||
"document/content/docs/upgrading/4-12/4122.mdx": "2025-09-04T22:59:41+08:00",
|
||||
"document/content/docs/upgrading/4-12/4123.mdx": "2025-09-05T17:31:22+08:00",
|
||||
"document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00",
|
||||
"document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00",
|
||||
"document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00",
|
||||
|
|
|
|||
|
|
@ -19,4 +19,4 @@ export default defineConfig({
|
|||
mdxOptions: {
|
||||
// MDX options
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import type { I18nStringType, localeType } from './type';
|
||||
|
||||
export const parseI18nString = (str: I18nStringType | string = '', lang: localeType = 'en') => {
|
||||
export const parseI18nString = (str: I18nStringType | string = '', lang = 'en') => {
|
||||
if (!str || typeof str === 'string') return str;
|
||||
return str[lang] ?? str['en'];
|
||||
return str[lang as localeType] ?? str['en'];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
export const isSecretValue = (val: any) => {
|
||||
return typeof val === 'object' && val !== null && !!val.secret;
|
||||
};
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
import type { ModelTypeEnum } from './model';
|
||||
import type { ModelProviderIdType } from './provider';
|
||||
|
||||
type PriceType = {
|
||||
charsPointsPrice?: number; // 1k chars=n points; 60s=n points;
|
||||
|
|
@ -9,7 +8,7 @@ type PriceType = {
|
|||
outputPrice?: number; // 1k tokens=n points
|
||||
};
|
||||
type BaseModelItemType = {
|
||||
provider: ModelProviderIdType;
|
||||
provider: string;
|
||||
model: string;
|
||||
name: string;
|
||||
avatar?: string; // model icon, from provider
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { i18nT } from '../../../web/i18n/utils';
|
||||
import type { LLMModelItemType, STTModelType, EmbeddingModelItemType } from './model.d';
|
||||
import { getModelProvider, type ModelProviderIdType } from './provider';
|
||||
|
||||
export enum ModelTypeEnum {
|
||||
llm = 'llm',
|
||||
|
|
@ -54,29 +53,6 @@ export const defaultSTTModels: STTModelType[] = [
|
|||
}
|
||||
];
|
||||
|
||||
export const getModelFromList = (
|
||||
modelList: { provider: ModelProviderIdType; name: string; model: string }[],
|
||||
model: string,
|
||||
language: string
|
||||
):
|
||||
| {
|
||||
avatar: string;
|
||||
provider: ModelProviderIdType;
|
||||
name: string;
|
||||
model: string;
|
||||
}
|
||||
| undefined => {
|
||||
const modelData = modelList.find((item) => item.model === model) ?? modelList[0];
|
||||
if (!modelData) {
|
||||
return;
|
||||
}
|
||||
const provider = getModelProvider(modelData.provider, language);
|
||||
return {
|
||||
...modelData,
|
||||
avatar: provider.avatar
|
||||
};
|
||||
};
|
||||
|
||||
export const modelTypeList = [
|
||||
{ label: i18nT('common:model.type.chat'), value: ModelTypeEnum.llm },
|
||||
{ label: i18nT('common:model.type.embedding'), value: ModelTypeEnum.embedding },
|
||||
|
|
|
|||
|
|
@ -1,77 +1,70 @@
|
|||
import { ModelProviders } from '../../sdk/fastgpt-plugin';
|
||||
import type { I18nStringStrictType } from '@fastgpt-sdk/plugin';
|
||||
|
||||
export type ModelProviderIdType = keyof typeof ModelProviders;
|
||||
type ProviderValueTypes = (typeof ModelProviders)[ModelProviderIdType];
|
||||
type langType = 'en' | 'zh-CN' | 'zh-Hant';
|
||||
|
||||
export type ModelProviderType = {
|
||||
id: ModelProviderIdType;
|
||||
name: any;
|
||||
export type ModelProviderItemType = {
|
||||
id: string;
|
||||
name: string;
|
||||
avatar: string;
|
||||
order: number;
|
||||
};
|
||||
|
||||
const getLocalizedName = (translations: ProviderValueTypes, language = 'en'): string => {
|
||||
return translations[language as langType];
|
||||
export type ModelProviderListType = {
|
||||
id: string;
|
||||
name: I18nStringStrictType | string;
|
||||
avatar: string;
|
||||
provider: string;
|
||||
};
|
||||
|
||||
export const formatModelProviderList = (language?: string) => {
|
||||
return Object.entries(ModelProviders).map(([id, translations], index) => ({
|
||||
id: id as ModelProviderIdType,
|
||||
name: getLocalizedName(translations, language),
|
||||
avatar: `/api/system/plugin/models/${id}.svg`,
|
||||
order: index
|
||||
}));
|
||||
};
|
||||
export const formatModelProviderMap = (language?: string) => {
|
||||
const provider = {} as Record<
|
||||
ModelProviderIdType,
|
||||
{
|
||||
id: string;
|
||||
name: string;
|
||||
avatar: string;
|
||||
order: number;
|
||||
}
|
||||
>;
|
||||
export type langType = keyof I18nStringStrictType;
|
||||
|
||||
Object.entries(ModelProviders).forEach(([id, translations], index) => {
|
||||
provider[id as ModelProviderIdType] = {
|
||||
id: id as ModelProviderIdType,
|
||||
name: getLocalizedName(translations, language),
|
||||
avatar: `/api/system/plugin/models/${id}.svg`,
|
||||
order: index
|
||||
};
|
||||
});
|
||||
|
||||
return provider;
|
||||
};
|
||||
|
||||
const ModelProviderListCache = {
|
||||
en: formatModelProviderList('en'),
|
||||
'zh-CN': formatModelProviderList('zh-CN'),
|
||||
'zh-Hant': formatModelProviderList('zh-Hant')
|
||||
};
|
||||
const ModelProviderMapCache = {
|
||||
en: formatModelProviderMap('en'),
|
||||
'zh-CN': formatModelProviderMap('zh-CN'),
|
||||
'zh-Hant': formatModelProviderMap('zh-Hant')
|
||||
};
|
||||
|
||||
const defaultProvider = {
|
||||
id: 'Other' as ModelProviderIdType,
|
||||
export const defaultProvider: ModelProviderItemType = {
|
||||
id: 'Other',
|
||||
name: 'Other',
|
||||
avatar: 'model/other',
|
||||
order: 0
|
||||
avatar: 'model/huggingface',
|
||||
order: 999
|
||||
};
|
||||
|
||||
export const getModelProviders = (language = 'en') => {
|
||||
return ModelProviderListCache[language as langType];
|
||||
};
|
||||
export const formatModelProviders = (data: { provider: string; value: I18nStringStrictType }[]) => {
|
||||
const getLocalizedName = (translations: I18nStringStrictType, language = 'en'): string => {
|
||||
return translations[language as langType] || translations.en;
|
||||
};
|
||||
|
||||
export const getModelProvider = (provider?: ModelProviderIdType, language = 'en') => {
|
||||
if (!provider) {
|
||||
return defaultProvider;
|
||||
}
|
||||
const formatModelProviderList = (language?: string): ModelProviderItemType[] => {
|
||||
return data.map(({ provider, value }, index) => ({
|
||||
id: provider,
|
||||
name: getLocalizedName(value, language),
|
||||
avatar: `/api/system/plugin/models/${provider}.svg`,
|
||||
order: index
|
||||
}));
|
||||
};
|
||||
|
||||
return ModelProviderMapCache[language as langType][provider] ?? defaultProvider;
|
||||
const formatModelProviderMap = (language?: string) => {
|
||||
const provider = {} as Record<string, ModelProviderItemType>;
|
||||
|
||||
data.forEach(({ provider: id, value }, index) => {
|
||||
provider[id] = {
|
||||
id,
|
||||
name: getLocalizedName(value, language),
|
||||
avatar: `/api/system/plugin/models/${id}.svg`,
|
||||
order: index
|
||||
};
|
||||
});
|
||||
|
||||
return provider;
|
||||
};
|
||||
|
||||
const ModelProviderListCache = {
|
||||
en: formatModelProviderList('en'),
|
||||
'zh-CN': formatModelProviderList('zh-CN'),
|
||||
'zh-Hant': formatModelProviderList('zh-Hant')
|
||||
};
|
||||
const ModelProviderMapCache = {
|
||||
en: formatModelProviderMap('en'),
|
||||
'zh-CN': formatModelProviderMap('zh-CN'),
|
||||
'zh-Hant': formatModelProviderMap('zh-Hant')
|
||||
};
|
||||
|
||||
return {
|
||||
ModelProviderListCache,
|
||||
ModelProviderMapCache
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -162,11 +162,23 @@ export type VariableItemType = {
|
|||
|
||||
// input
|
||||
maxLength?: number;
|
||||
// password
|
||||
minLength?: number;
|
||||
// numberInput
|
||||
max?: number;
|
||||
min?: number;
|
||||
// select
|
||||
list?: { label: string; value: string }[];
|
||||
// file
|
||||
canSelectFile?: boolean;
|
||||
canSelectImg?: boolean;
|
||||
maxFiles?: number;
|
||||
// timeSelect
|
||||
timeGranularity?: 'second' | 'minute' | 'hour' | 'day';
|
||||
timeType?: 'point' | 'range';
|
||||
timeRangeStart?: string;
|
||||
timeRangeEnd?: string;
|
||||
|
||||
// @deprecated
|
||||
enums?: { value: string; label: string }[];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import type { AppChatConfigType, AppSimpleEditFormType } from '../app/type';
|
||||
import { FlowNodeTypeEnum } from '../workflow/node/constant';
|
||||
import { NodeInputKeyEnum, FlowNodeTemplateTypeEnum } from '../workflow/constants';
|
||||
import { FlowNodeTemplateTypeEnum, NodeInputKeyEnum } from '../workflow/constants';
|
||||
import type { FlowNodeInputItemType } from '../workflow/type/io.d';
|
||||
import { getAppChatConfig } from '../workflow/utils';
|
||||
import { type StoreNodeItemType } from '../workflow/type/node';
|
||||
|
|
|
|||
|
|
@ -4,21 +4,8 @@ import type { JsonSchemaPropertiesItemType } from '../app/jsonschema';
|
|||
export enum FlowNodeTemplateTypeEnum {
|
||||
systemInput = 'systemInput',
|
||||
ai = 'ai',
|
||||
function = 'function',
|
||||
interactive = 'interactive',
|
||||
|
||||
// System tool type
|
||||
tools = 'tools',
|
||||
search = 'search',
|
||||
multimodal = 'multimodal',
|
||||
communication = 'communication',
|
||||
finance = 'finance',
|
||||
design = 'design',
|
||||
productivity = 'productivity',
|
||||
news = 'news',
|
||||
entertainment = 'entertainment',
|
||||
social = 'social',
|
||||
scientific = 'scientific',
|
||||
other = 'other',
|
||||
|
||||
// Team app type
|
||||
|
|
@ -332,53 +319,144 @@ export enum VariableInputEnum {
|
|||
input = 'input',
|
||||
textarea = 'textarea',
|
||||
numberInput = 'numberInput',
|
||||
JSONEditor = 'JSONEditor',
|
||||
select = 'select',
|
||||
custom = 'custom'
|
||||
multipleSelect = 'multipleSelect',
|
||||
timePointSelect = 'timePointSelect',
|
||||
timeRangeSelect = 'timeRangeSelect',
|
||||
switch = 'switch',
|
||||
password = 'password',
|
||||
file = 'file',
|
||||
|
||||
modelSelect = 'modelSelect',
|
||||
datasetSelect = 'datasetSelect',
|
||||
|
||||
custom = 'custom',
|
||||
internal = 'internal'
|
||||
}
|
||||
export const variableMap: Record<
|
||||
VariableInputEnum,
|
||||
{
|
||||
icon: string;
|
||||
label: string;
|
||||
value: VariableInputEnum;
|
||||
defaultValueType: WorkflowIOValueTypeEnum;
|
||||
description?: string;
|
||||
}
|
||||
> = {
|
||||
[VariableInputEnum.input]: {
|
||||
icon: 'core/workflow/inputType/input',
|
||||
label: i18nT('common:core.workflow.inputType.textInput'),
|
||||
value: VariableInputEnum.input,
|
||||
defaultValueType: WorkflowIOValueTypeEnum.string
|
||||
},
|
||||
|
||||
type VariableConfigType = {
|
||||
icon: string;
|
||||
label: string;
|
||||
value: VariableInputEnum;
|
||||
defaultValueType: WorkflowIOValueTypeEnum;
|
||||
description?: string;
|
||||
};
|
||||
|
||||
export const variableConfigs: VariableConfigType[][] = [
|
||||
[
|
||||
{
|
||||
icon: 'core/workflow/inputType/input',
|
||||
label: i18nT('common:core.workflow.inputType.textInput'),
|
||||
value: VariableInputEnum.input,
|
||||
defaultValueType: WorkflowIOValueTypeEnum.string
|
||||
},
|
||||
{
|
||||
icon: 'core/workflow/inputType/password',
|
||||
label: i18nT('common:core.workflow.inputType.password'),
|
||||
value: VariableInputEnum.password,
|
||||
defaultValueType: WorkflowIOValueTypeEnum.string
|
||||
},
|
||||
{
|
||||
icon: 'core/workflow/inputType/numberInput',
|
||||
label: i18nT('common:core.workflow.inputType.number input'),
|
||||
value: VariableInputEnum.numberInput,
|
||||
defaultValueType: WorkflowIOValueTypeEnum.number
|
||||
},
|
||||
// {
|
||||
// icon: 'core/workflow/inputType/jsonEditor',
|
||||
// label: i18nT('common:core.workflow.inputType.jsonEditor'),
|
||||
// value: VariableInputEnum.JSONEditor,
|
||||
// defaultValueType: WorkflowIOValueTypeEnum.object
|
||||
// },
|
||||
{
|
||||
icon: 'core/workflow/inputType/option',
|
||||
label: i18nT('common:core.workflow.inputType.select'),
|
||||
value: VariableInputEnum.select,
|
||||
defaultValueType: WorkflowIOValueTypeEnum.string
|
||||
},
|
||||
{
|
||||
icon: 'core/workflow/inputType/multipleSelect',
|
||||
label: i18nT('common:core.workflow.inputType.multipleSelect'),
|
||||
value: VariableInputEnum.multipleSelect,
|
||||
defaultValueType: WorkflowIOValueTypeEnum.arrayString
|
||||
},
|
||||
{
|
||||
icon: 'core/workflow/inputType/switch',
|
||||
label: i18nT('common:core.workflow.inputType.switch'),
|
||||
value: VariableInputEnum.switch,
|
||||
defaultValueType: WorkflowIOValueTypeEnum.boolean
|
||||
}
|
||||
// {
|
||||
// icon: 'core/workflow/inputType/timePointSelect',
|
||||
// label: i18nT('common:core.workflow.inputType.timePointSelect'),
|
||||
// value: VariableInputEnum.timePointSelect,
|
||||
// defaultValueType: WorkflowIOValueTypeEnum.string
|
||||
// },
|
||||
// {
|
||||
// icon: 'core/workflow/inputType/timeRangeSelect',
|
||||
// label: i18nT('common:core.workflow.inputType.timeRangeSelect'),
|
||||
// value: VariableInputEnum.timeRangeSelect,
|
||||
// defaultValueType: WorkflowIOValueTypeEnum.arrayString
|
||||
// }
|
||||
// {
|
||||
// icon: 'core/workflow/inputType/file',
|
||||
// label: i18nT('common:core.workflow.inputType.file'),
|
||||
// value: VariableInputEnum.file,
|
||||
// defaultValueType: WorkflowIOValueTypeEnum.arrayString
|
||||
// }
|
||||
],
|
||||
// [
|
||||
// {
|
||||
// icon: 'core/workflow/inputType/model',
|
||||
// label: i18nT('common:core.workflow.inputType.modelSelect'),
|
||||
// value: VariableInputEnum.modelSelect,
|
||||
// defaultValueType: WorkflowIOValueTypeEnum.string
|
||||
// },
|
||||
// {
|
||||
// icon: 'core/workflow/inputType/dataset',
|
||||
// label: i18nT('common:core.workflow.inputType.datasetSelect'),
|
||||
// value: VariableInputEnum.datasetSelect,
|
||||
// defaultValueType: WorkflowIOValueTypeEnum.arrayString
|
||||
// }
|
||||
// ],
|
||||
[
|
||||
{
|
||||
icon: 'core/workflow/inputType/external',
|
||||
label: i18nT('common:core.workflow.inputType.custom'),
|
||||
value: VariableInputEnum.custom,
|
||||
defaultValueType: WorkflowIOValueTypeEnum.string,
|
||||
description: i18nT('app:variable.select type_desc')
|
||||
},
|
||||
{
|
||||
icon: 'core/workflow/inputType/internal',
|
||||
label: i18nT('common:core.workflow.inputType.internal'),
|
||||
value: VariableInputEnum.internal,
|
||||
defaultValueType: WorkflowIOValueTypeEnum.string,
|
||||
description: i18nT('app:variable.internal_type_desc')
|
||||
}
|
||||
]
|
||||
];
|
||||
|
||||
export const variableMap: Record<VariableInputEnum, VariableConfigType> = {
|
||||
...variableConfigs
|
||||
.flat()
|
||||
.reduce(
|
||||
(acc, config) => ({ ...acc, [config.value]: config }),
|
||||
{} as Record<VariableInputEnum, VariableConfigType>
|
||||
),
|
||||
[VariableInputEnum.textarea]: {
|
||||
icon: 'core/workflow/inputType/textarea',
|
||||
label: i18nT('common:core.workflow.inputType.textarea'),
|
||||
value: VariableInputEnum.textarea,
|
||||
defaultValueType: WorkflowIOValueTypeEnum.string,
|
||||
description: i18nT('app:variable.textarea_type_desc')
|
||||
},
|
||||
[VariableInputEnum.numberInput]: {
|
||||
icon: 'core/workflow/inputType/numberInput',
|
||||
label: i18nT('common:core.workflow.inputType.number input'),
|
||||
value: VariableInputEnum.numberInput,
|
||||
defaultValueType: WorkflowIOValueTypeEnum.number
|
||||
},
|
||||
[VariableInputEnum.select]: {
|
||||
icon: 'core/workflow/inputType/option',
|
||||
label: i18nT('common:core.workflow.inputType.select'),
|
||||
value: VariableInputEnum.select,
|
||||
defaultValueType: WorkflowIOValueTypeEnum.string
|
||||
},
|
||||
[VariableInputEnum.custom]: {
|
||||
icon: 'core/workflow/inputType/customVariable',
|
||||
label: i18nT('common:core.workflow.inputType.custom'),
|
||||
value: VariableInputEnum.custom,
|
||||
defaultValueType: WorkflowIOValueTypeEnum.string,
|
||||
description: i18nT('app:variable.select type_desc')
|
||||
}
|
||||
};
|
||||
|
||||
// Keep backward compatibility
|
||||
export const variableMapGroups = variableConfigs;
|
||||
|
||||
/* run time */
|
||||
export enum RuntimeEdgeStatusEnum {
|
||||
'waiting' = 'waiting',
|
||||
|
|
|
|||
|
|
@ -30,7 +30,10 @@ export enum FlowNodeInputTypeEnum { // render ui
|
|||
hidden = 'hidden',
|
||||
custom = 'custom',
|
||||
|
||||
fileSelect = 'fileSelect'
|
||||
fileSelect = 'fileSelect',
|
||||
timePointSelect = 'timePointSelect',
|
||||
timeRangeSelect = 'timeRangeSelect',
|
||||
password = 'password'
|
||||
}
|
||||
export const FlowNodeInputMap: Record<
|
||||
FlowNodeInputTypeEnum,
|
||||
|
|
@ -94,6 +97,15 @@ export const FlowNodeInputMap: Record<
|
|||
},
|
||||
[FlowNodeInputTypeEnum.fileSelect]: {
|
||||
icon: 'core/workflow/inputType/file'
|
||||
},
|
||||
[FlowNodeInputTypeEnum.timePointSelect]: {
|
||||
icon: 'core/workflow/inputType/timePointSelect'
|
||||
},
|
||||
[FlowNodeInputTypeEnum.timeRangeSelect]: {
|
||||
icon: 'core/workflow/inputType/timeRangeSelect'
|
||||
},
|
||||
[FlowNodeInputTypeEnum.password]: {
|
||||
icon: 'core/workflow/inputType/password'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import type { FlowNodeOutputItemType, ReferenceValueType } from '../type/io';
|
|||
import type { StoreNodeItemType } from '../type/node';
|
||||
import { isValidReferenceValueFormat } from '../utils';
|
||||
import type { RuntimeEdgeItemType, RuntimeNodeItemType } from './type';
|
||||
import { isSecretValue } from '../../../common/secret/utils';
|
||||
|
||||
export const checkIsBranchNode = (node: RuntimeNodeItemType) => {
|
||||
if (node.catchError) return true;
|
||||
|
|
@ -67,7 +68,7 @@ export const getMaxHistoryLimitFromNodes = (nodes: StoreNodeItemType[]): number
|
|||
};
|
||||
|
||||
/* value type format */
|
||||
export const valueTypeFormat = (value: any, type?: WorkflowIOValueTypeEnum) => {
|
||||
export const valueTypeFormat = (value: any, valueType?: WorkflowIOValueTypeEnum) => {
|
||||
const isObjectString = (value: any) => {
|
||||
if (typeof value === 'string' && value !== 'false' && value !== 'true') {
|
||||
const trimmedValue = value.trim();
|
||||
|
|
@ -81,34 +82,37 @@ export const valueTypeFormat = (value: any, type?: WorkflowIOValueTypeEnum) => {
|
|||
|
||||
// 1. any值,忽略格式化
|
||||
if (value === undefined || value === null) return value;
|
||||
if (!type || type === WorkflowIOValueTypeEnum.any) return value;
|
||||
if (!valueType || valueType === WorkflowIOValueTypeEnum.any) return value;
|
||||
|
||||
// Password check
|
||||
if (valueType === WorkflowIOValueTypeEnum.string && isSecretValue(value)) return value;
|
||||
|
||||
// 2. 如果值已经符合目标类型,直接返回
|
||||
if (
|
||||
(type === WorkflowIOValueTypeEnum.string && typeof value === 'string') ||
|
||||
(type === WorkflowIOValueTypeEnum.number && typeof value === 'number') ||
|
||||
(type === WorkflowIOValueTypeEnum.boolean && typeof value === 'boolean') ||
|
||||
(type.startsWith('array') && Array.isArray(value)) ||
|
||||
(type === WorkflowIOValueTypeEnum.object && typeof value === 'object') ||
|
||||
(type === WorkflowIOValueTypeEnum.chatHistory &&
|
||||
(valueType === WorkflowIOValueTypeEnum.string && typeof value === 'string') ||
|
||||
(valueType === WorkflowIOValueTypeEnum.number && typeof value === 'number') ||
|
||||
(valueType === WorkflowIOValueTypeEnum.boolean && typeof value === 'boolean') ||
|
||||
(valueType.startsWith('array') && Array.isArray(value)) ||
|
||||
(valueType === WorkflowIOValueTypeEnum.object && typeof value === 'object') ||
|
||||
(valueType === WorkflowIOValueTypeEnum.chatHistory &&
|
||||
(Array.isArray(value) || typeof value === 'number')) ||
|
||||
(type === WorkflowIOValueTypeEnum.datasetQuote && Array.isArray(value)) ||
|
||||
(type === WorkflowIOValueTypeEnum.selectDataset && Array.isArray(value)) ||
|
||||
(type === WorkflowIOValueTypeEnum.selectApp && typeof value === 'object')
|
||||
(valueType === WorkflowIOValueTypeEnum.datasetQuote && Array.isArray(value)) ||
|
||||
(valueType === WorkflowIOValueTypeEnum.selectDataset && Array.isArray(value)) ||
|
||||
(valueType === WorkflowIOValueTypeEnum.selectApp && typeof value === 'object')
|
||||
) {
|
||||
return value;
|
||||
}
|
||||
|
||||
// 4. 按目标类型,进行格式转化
|
||||
// 4.1 基本类型转换
|
||||
if (type === WorkflowIOValueTypeEnum.string) {
|
||||
if (valueType === WorkflowIOValueTypeEnum.string) {
|
||||
return typeof value === 'object' ? JSON.stringify(value) : String(value);
|
||||
}
|
||||
if (type === WorkflowIOValueTypeEnum.number) {
|
||||
if (valueType === WorkflowIOValueTypeEnum.number) {
|
||||
if (value === '') return undefined;
|
||||
return Number(value);
|
||||
}
|
||||
if (type === WorkflowIOValueTypeEnum.boolean) {
|
||||
if (valueType === WorkflowIOValueTypeEnum.boolean) {
|
||||
if (typeof value === 'string') {
|
||||
return value.toLowerCase() === 'true';
|
||||
}
|
||||
|
|
@ -116,7 +120,7 @@ export const valueTypeFormat = (value: any, type?: WorkflowIOValueTypeEnum) => {
|
|||
}
|
||||
|
||||
// 4.3 字符串转对象
|
||||
if (type === WorkflowIOValueTypeEnum.object) {
|
||||
if (valueType === WorkflowIOValueTypeEnum.object) {
|
||||
if (isObjectString(value)) {
|
||||
const trimmedValue = value.trim();
|
||||
try {
|
||||
|
|
@ -127,7 +131,7 @@ export const valueTypeFormat = (value: any, type?: WorkflowIOValueTypeEnum) => {
|
|||
}
|
||||
|
||||
// 4.4 数组类型(这里 value 不是数组类型)(TODO: 嵌套数据类型转化)
|
||||
if (type.startsWith('array')) {
|
||||
if (valueType.startsWith('array')) {
|
||||
if (isObjectString(value)) {
|
||||
try {
|
||||
return json5.parse(value);
|
||||
|
|
@ -142,7 +146,7 @@ export const valueTypeFormat = (value: any, type?: WorkflowIOValueTypeEnum) => {
|
|||
WorkflowIOValueTypeEnum.datasetQuote,
|
||||
WorkflowIOValueTypeEnum.selectDataset,
|
||||
WorkflowIOValueTypeEnum.selectApp
|
||||
].includes(type)
|
||||
].includes(valueType)
|
||||
) {
|
||||
if (isObjectString(value)) {
|
||||
try {
|
||||
|
|
@ -153,7 +157,7 @@ export const valueTypeFormat = (value: any, type?: WorkflowIOValueTypeEnum) => {
|
|||
}
|
||||
|
||||
// Invalid history type
|
||||
if (type === WorkflowIOValueTypeEnum.chatHistory) {
|
||||
if (valueType === WorkflowIOValueTypeEnum.chatHistory) {
|
||||
if (isObjectString(value)) {
|
||||
try {
|
||||
return json5.parse(value);
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import { FlowNodeInputTypeEnum, FlowNodeTypeEnum } from '../../node/constant';
|
|||
import { type FlowNodeTemplateType } from '../../type/node.d';
|
||||
import {
|
||||
WorkflowIOValueTypeEnum,
|
||||
FlowNodeTemplateTypeEnum,
|
||||
NodeInputKeyEnum
|
||||
NodeInputKeyEnum,
|
||||
FlowNodeTemplateTypeEnum
|
||||
} from '../../constants';
|
||||
import { i18nT } from '../../../../../web/i18n/utils';
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import {
|
|||
WorkflowIOValueTypeEnum,
|
||||
NodeInputKeyEnum,
|
||||
NodeOutputKeyEnum,
|
||||
FlowNodeTemplateTypeEnum,
|
||||
ContentTypes
|
||||
ContentTypes,
|
||||
FlowNodeTemplateTypeEnum
|
||||
} from '../../constants';
|
||||
import { Input_Template_DynamicInput } from '../input';
|
||||
import { Output_Template_AddOutput } from '../output';
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import { type FlowNodeTemplateType } from '../../type/node.d';
|
|||
import {
|
||||
WorkflowIOValueTypeEnum,
|
||||
NodeOutputKeyEnum,
|
||||
FlowNodeTemplateTypeEnum,
|
||||
NodeInputKeyEnum
|
||||
NodeInputKeyEnum,
|
||||
FlowNodeTemplateTypeEnum
|
||||
} from '../../constants';
|
||||
import { i18nT } from '../../../../../web/i18n/utils';
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ import {
|
|||
type ReferenceArrayValueType,
|
||||
type ReferenceItemValueType
|
||||
} from './type/io.d';
|
||||
import type { NodeToolConfigType } from './type/node';
|
||||
import { type StoreNodeItemType } from './type/node';
|
||||
import type {
|
||||
VariableItemType,
|
||||
|
|
@ -247,7 +246,7 @@ export const appData2FlowNodeIO = ({
|
|||
const variableInput = !chatConfig?.variables
|
||||
? []
|
||||
: chatConfig.variables.map((item) => {
|
||||
const renderTypeMap = {
|
||||
const renderTypeMap: Record<VariableInputEnum, FlowNodeInputTypeEnum[]> = {
|
||||
[VariableInputEnum.input]: [FlowNodeInputTypeEnum.input, FlowNodeInputTypeEnum.reference],
|
||||
[VariableInputEnum.textarea]: [
|
||||
FlowNodeInputTypeEnum.textarea,
|
||||
|
|
@ -255,16 +254,22 @@ export const appData2FlowNodeIO = ({
|
|||
],
|
||||
[VariableInputEnum.numberInput]: [FlowNodeInputTypeEnum.numberInput],
|
||||
[VariableInputEnum.select]: [FlowNodeInputTypeEnum.select],
|
||||
[VariableInputEnum.custom]: [
|
||||
FlowNodeInputTypeEnum.input,
|
||||
FlowNodeInputTypeEnum.reference
|
||||
],
|
||||
default: [FlowNodeInputTypeEnum.reference]
|
||||
[VariableInputEnum.multipleSelect]: [FlowNodeInputTypeEnum.multipleSelect],
|
||||
[VariableInputEnum.JSONEditor]: [FlowNodeInputTypeEnum.JSONEditor],
|
||||
[VariableInputEnum.timePointSelect]: [FlowNodeInputTypeEnum.timePointSelect],
|
||||
[VariableInputEnum.timeRangeSelect]: [FlowNodeInputTypeEnum.timeRangeSelect],
|
||||
[VariableInputEnum.switch]: [FlowNodeInputTypeEnum.switch],
|
||||
[VariableInputEnum.password]: [FlowNodeInputTypeEnum.password],
|
||||
[VariableInputEnum.file]: [FlowNodeInputTypeEnum.fileSelect],
|
||||
[VariableInputEnum.modelSelect]: [FlowNodeInputTypeEnum.selectLLMModel],
|
||||
[VariableInputEnum.datasetSelect]: [FlowNodeInputTypeEnum.selectDataset],
|
||||
[VariableInputEnum.internal]: [FlowNodeInputTypeEnum.hidden],
|
||||
[VariableInputEnum.custom]: [FlowNodeInputTypeEnum.input, FlowNodeInputTypeEnum.reference]
|
||||
};
|
||||
|
||||
return {
|
||||
key: item.key,
|
||||
renderTypeList: renderTypeMap[item.type] || renderTypeMap.default,
|
||||
renderTypeList: renderTypeMap[item.type] || [FlowNodeInputTypeEnum.reference],
|
||||
label: item.label,
|
||||
debugLabel: item.label,
|
||||
description: '',
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "@fastgpt/global",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@fastgpt-sdk/plugin": "^0.1.12",
|
||||
"@fastgpt-sdk/plugin": "^0.1.16",
|
||||
"@apidevtools/swagger-parser": "^10.1.0",
|
||||
"@bany/curl-to-json": "^1.2.8",
|
||||
"axios": "^1.8.2",
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { decryptSecret, encryptSecret } from './aes256gcm';
|
|||
import type { SecretValueType } from '@fastgpt/global/common/secret/type';
|
||||
import { type StoreSecretValueType } from '@fastgpt/global/common/secret/type';
|
||||
import { HeaderSecretTypeEnum } from '@fastgpt/global/common/secret/constants';
|
||||
import { isSecretValue } from '../../../global/common/secret/utils';
|
||||
|
||||
export const encryptSecretValue = (value: SecretValueType): SecretValueType => {
|
||||
if (!value.value) {
|
||||
|
|
@ -48,3 +49,9 @@ export const getSecretValue = ({
|
|||
return acc;
|
||||
}, {});
|
||||
};
|
||||
|
||||
export const anyValueDecrypt = (value: any) => {
|
||||
if (!isSecretValue(value)) return value;
|
||||
|
||||
return decryptSecret(value.secret);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import type {
|
|||
EmbeddingRecallResponse,
|
||||
InsertVectorControllerProps
|
||||
} from '../controller.d';
|
||||
import { delay, retryFn } from '@fastgpt/global/common/system/utils';
|
||||
import { retryFn } from '@fastgpt/global/common/system/utils';
|
||||
import { addLog } from '../../system/log';
|
||||
import { customNanoid } from '@fastgpt/global/common/string/tools';
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import {
|
|||
type RerankModelItemType
|
||||
} from '@fastgpt/global/core/ai/model.d';
|
||||
import { debounce } from 'lodash';
|
||||
import { getModelProvider } from '@fastgpt/global/core/ai/provider';
|
||||
import { getModelProvider } from '../../../core/app/provider/controller';
|
||||
import { findModelFromAlldata } from '../model';
|
||||
import {
|
||||
reloadFastGPTConfigBuffer,
|
||||
|
|
@ -18,6 +18,7 @@ import {
|
|||
import { delay } from '@fastgpt/global/common/system/utils';
|
||||
import { pluginClient } from '../../../thirdProvider/fastgptPlugin';
|
||||
import { setCron } from '../../../common/system/cron';
|
||||
import { preloadModelProviders } from '../../../core/app/provider/controller';
|
||||
|
||||
export const loadSystemModels = async (init = false, language = 'en') => {
|
||||
const pushModel = (model: SystemModelItemType) => {
|
||||
|
|
@ -77,6 +78,8 @@ export const loadSystemModels = async (init = false, language = 'en') => {
|
|||
|
||||
if (!init && global.systemModelList) return;
|
||||
|
||||
await preloadModelProviders();
|
||||
|
||||
global.systemModelList = [];
|
||||
global.systemActiveModelList = [];
|
||||
global.llmModelMap = new Map<string, LLMModelItemType>();
|
||||
|
|
@ -109,14 +112,13 @@ export const loadSystemModels = async (init = false, language = 'en') => {
|
|||
};
|
||||
|
||||
const dbModel = dbModels.find((item) => item.model === model.model);
|
||||
const provider = getModelProvider(dbModel?.metadata?.provider || model.provider, language);
|
||||
|
||||
const modelData: any = {
|
||||
...model,
|
||||
...dbModel?.metadata,
|
||||
provider: getModelProvider(
|
||||
dbModel?.metadata?.provider || (model.provider as any),
|
||||
language
|
||||
).id,
|
||||
provider: provider.id,
|
||||
avatar: provider.avatar,
|
||||
type: dbModel?.metadata?.type || model.type,
|
||||
isCustom: false,
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@ import type {
|
|||
EmbeddingModelItemType,
|
||||
LLMModelItemType
|
||||
} from '@fastgpt/global/core/ai/model.d';
|
||||
import type { ModelProviderListType } from '@fastgpt/global/core/app/model/type';
|
||||
import type {
|
||||
AiproxyMapProviderType,
|
||||
I18nStringStrictType
|
||||
} from '@fastgpt/global/sdk/fastgpt-plugin';
|
||||
import type { langType, ModelProviderItemType } from '@fastgpt/global/core/ai/provider';
|
||||
|
||||
export type SystemModelSchemaType = {
|
||||
_id: string;
|
||||
|
|
@ -32,6 +38,11 @@ export type SystemDefaultModelType = {
|
|||
};
|
||||
|
||||
declare global {
|
||||
var ModelProviderRawCache: { provider: string; value: I18nStringStrictType }[];
|
||||
var ModelProviderListCache: Record<langType, ModelProviderItemType[]>;
|
||||
var ModelProviderMapCache: Record<langType, Record<string, ModelProviderItemType>>;
|
||||
var aiproxyIdMapCache: AiproxyMapProviderType;
|
||||
|
||||
var systemModelList: SystemModelItemType[];
|
||||
// var systemModelMap: Map<string, SystemModelItemType>;
|
||||
var llmModelMap: Map<string, LLMModelItemType>;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,147 @@
|
|||
import { evaluationFileErrors } from '@fastgpt/global/core/app/evaluation/constants';
|
||||
import { getEvaluationFileHeader } from '@fastgpt/global/core/app/evaluation/utils';
|
||||
import type { VariableItemType } from '@fastgpt/global/core/app/type';
|
||||
import { addLog } from '../../../common/system/log';
|
||||
import { VariableInputEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import Papa from 'papaparse';
|
||||
|
||||
export const parseEvaluationCSV = (rawText: string) => {
|
||||
const parseResult = Papa.parse(rawText.trim(), {
|
||||
skipEmptyLines: true,
|
||||
header: false,
|
||||
transformHeader: (header: string) => header.trim()
|
||||
});
|
||||
|
||||
if (parseResult.errors.length > 0) {
|
||||
addLog.error('CSV parsing failed', parseResult.errors);
|
||||
throw new Error('CSV parsing failed');
|
||||
}
|
||||
|
||||
return parseResult.data as string[][];
|
||||
};
|
||||
|
||||
export const validateEvaluationFile = async (
|
||||
rawText: string,
|
||||
appVariables?: VariableItemType[]
|
||||
) => {
|
||||
// Parse CSV using Papa Parse
|
||||
const csvData = parseEvaluationCSV(rawText);
|
||||
const dataLength = csvData.length;
|
||||
|
||||
// Validate file header
|
||||
const expectedHeader = getEvaluationFileHeader(appVariables);
|
||||
const actualHeader = csvData[0]?.join(',') || '';
|
||||
if (actualHeader !== expectedHeader) {
|
||||
addLog.error(`Header mismatch. Expected: ${expectedHeader}, Got: ${actualHeader}`);
|
||||
return Promise.reject(evaluationFileErrors);
|
||||
}
|
||||
|
||||
// Validate data rows count
|
||||
if (dataLength <= 1) {
|
||||
addLog.error('No data rows found');
|
||||
return Promise.reject(evaluationFileErrors);
|
||||
}
|
||||
|
||||
const maxRows = 1000;
|
||||
if (dataLength - 1 > maxRows) {
|
||||
addLog.error(`Too many rows. Max: ${maxRows}, Got: ${dataLength - 1}`);
|
||||
return Promise.reject(evaluationFileErrors);
|
||||
}
|
||||
|
||||
const headers = csvData[0];
|
||||
|
||||
// Get required field indices
|
||||
const requiredFields = headers
|
||||
.map((header, index) => ({ header: header.trim(), index }))
|
||||
.filter(({ header }) => header.startsWith('*'));
|
||||
|
||||
const errors: string[] = [];
|
||||
|
||||
// Validate each data row
|
||||
for (let i = 1; i < csvData.length; i++) {
|
||||
const values = csvData[i];
|
||||
|
||||
// Check required fields
|
||||
requiredFields.forEach(({ header, index }) => {
|
||||
if (!values[index]?.trim()) {
|
||||
errors.push(`Row ${i + 1}: required field "${header}" is empty`);
|
||||
}
|
||||
});
|
||||
|
||||
// Validate app variables
|
||||
if (appVariables) {
|
||||
validateRowVariables({
|
||||
values,
|
||||
variables: appVariables,
|
||||
rowNum: i + 1,
|
||||
errors
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (errors.length > 0) {
|
||||
addLog.error(`Validation failed: ${errors.join('; ')}`);
|
||||
return Promise.reject(evaluationFileErrors);
|
||||
}
|
||||
|
||||
return { csvData, dataLength };
|
||||
};
|
||||
|
||||
const validateRowVariables = ({
|
||||
values,
|
||||
variables,
|
||||
rowNum,
|
||||
errors
|
||||
}: {
|
||||
values: string[];
|
||||
variables: VariableItemType[];
|
||||
rowNum: number;
|
||||
errors: string[];
|
||||
}) => {
|
||||
variables.forEach((variable, index) => {
|
||||
const value = values[index]?.trim();
|
||||
|
||||
// Skip validation if value is empty and not required
|
||||
if (!value && !variable.required) return;
|
||||
|
||||
switch (variable.type) {
|
||||
case VariableInputEnum.input:
|
||||
// Validate string length
|
||||
if (variable.maxLength && value && value.length > variable.maxLength) {
|
||||
errors.push(
|
||||
`Row ${rowNum}: "${variable.label}" exceeds max length (${variable.maxLength})`
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case VariableInputEnum.numberInput:
|
||||
// Validate number type and range
|
||||
if (value) {
|
||||
const numValue = Number(value);
|
||||
if (isNaN(numValue)) {
|
||||
errors.push(`Row ${rowNum}: "${variable.label}" must be a number`);
|
||||
} else {
|
||||
if (variable.min !== undefined && numValue < variable.min) {
|
||||
errors.push(`Row ${rowNum}: "${variable.label}" below minimum (${variable.min})`);
|
||||
}
|
||||
if (variable.max !== undefined && numValue > variable.max) {
|
||||
errors.push(`Row ${rowNum}: "${variable.label}" exceeds maximum (${variable.max})`);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case VariableInputEnum.select:
|
||||
// Validate select options
|
||||
if (value && variable.enums?.length) {
|
||||
const validOptions = variable.enums.map((item) => item.value);
|
||||
if (!validOptions.includes(value)) {
|
||||
errors.push(
|
||||
`Row ${rowNum}: "${variable.label}" invalid option. Valid: [${validOptions.join(', ')}]`
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -504,17 +504,17 @@ const dbPluginFormat = (item: SystemPluginConfigSchemaType): SystemPluginTemplat
|
|||
|
||||
/* FastsGPT-Pluign api: */
|
||||
function getCachedSystemPlugins() {
|
||||
if (!global.systemPlugins_cache) {
|
||||
global.systemPlugins_cache = {
|
||||
if (!global.systemToolsCache) {
|
||||
global.systemToolsCache = {
|
||||
expires: 0,
|
||||
data: [] as SystemPluginTemplateItemType[]
|
||||
};
|
||||
}
|
||||
return global.systemPlugins_cache;
|
||||
return global.systemToolsCache;
|
||||
}
|
||||
|
||||
const cleanSystemPluginCache = () => {
|
||||
global.systemPlugins_cache = undefined;
|
||||
global.systemToolsCache = undefined;
|
||||
};
|
||||
|
||||
export const refetchSystemPlugins = () => {
|
||||
|
|
@ -579,15 +579,20 @@ export const getSystemTools = async (): Promise<SystemPluginTemplateItemType[]>
|
|||
.filter((item) => item.customConfig?.associatedPluginId)
|
||||
.map((item) => dbPluginFormat(item));
|
||||
|
||||
const plugins = [...formatTools, ...dbPlugins];
|
||||
plugins.sort((a, b) => (a.pluginOrder ?? 0) - (b.pluginOrder ?? 0));
|
||||
const concatTools = [...formatTools, ...dbPlugins];
|
||||
concatTools.sort((a, b) => (a.pluginOrder ?? 0) - (b.pluginOrder ?? 0));
|
||||
|
||||
global.systemPlugins_cache = {
|
||||
global.systemToolsCache = {
|
||||
expires: Date.now() + 30 * 60 * 1000, // 30 minutes
|
||||
data: plugins
|
||||
data: concatTools
|
||||
};
|
||||
|
||||
return plugins;
|
||||
global.systemToolsTypeCache = {};
|
||||
concatTools.forEach((item) => {
|
||||
global.systemToolsTypeCache[item.templateType] = 1;
|
||||
});
|
||||
|
||||
return concatTools;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -608,10 +613,11 @@ export const getSystemToolById = async (id: string): Promise<SystemPluginTemplat
|
|||
};
|
||||
|
||||
declare global {
|
||||
var systemPlugins_cache:
|
||||
var systemToolsCache:
|
||||
| {
|
||||
expires: number;
|
||||
data: SystemPluginTemplateItemType[];
|
||||
}
|
||||
| undefined;
|
||||
var systemToolsTypeCache: Record<string, 1>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { connectionMongo, getMongoModel } from '../../../common/mongo/index';
|
||||
import { type PluginGroupSchemaType, type TGroupType } from './type';
|
||||
import { type SystemToolGroupSchemaType, type TGroupType } from './type';
|
||||
const { Schema } = connectionMongo;
|
||||
|
||||
export const collectionName = 'app_plugin_groups';
|
||||
|
|
@ -29,7 +29,7 @@ const PluginGroupSchema = new Schema({
|
|||
|
||||
PluginGroupSchema.index({ groupId: 1 }, { unique: true });
|
||||
|
||||
export const MongoPluginGroups = getMongoModel<PluginGroupSchemaType>(
|
||||
export const MongoToolGroups = getMongoModel<SystemToolGroupSchemaType>(
|
||||
collectionName,
|
||||
PluginGroupSchema
|
||||
);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { SystemPluginListItemType } from '@fastgpt/global/core/app/type';
|
|||
import { FlowNodeTemplateTypeEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import type { WorkflowTemplateBasicType } from '@fastgpt/global/core/workflow/type';
|
||||
import type { InputConfigType } from '@fastgpt/global/core/workflow/type/io';
|
||||
import type { I18nStringStrictType } from '@fastgpt/global/sdk/fastgpt-plugin';
|
||||
|
||||
export type SystemPluginConfigSchemaType = {
|
||||
pluginId: string;
|
||||
|
|
@ -38,11 +39,11 @@ export type SystemPluginConfigSchemaType = {
|
|||
};
|
||||
|
||||
export type TGroupType = {
|
||||
typeName: string;
|
||||
typeName: I18nStringStrictType | string;
|
||||
typeId: string;
|
||||
};
|
||||
|
||||
export type PluginGroupSchemaType = {
|
||||
export type SystemToolGroupSchemaType = {
|
||||
groupId: string;
|
||||
groupAvatar: string;
|
||||
groupName: string;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
import { loadModelProviders } from '../../../thirdProvider/fastgptPlugin/model';
|
||||
import {
|
||||
type langType,
|
||||
defaultProvider,
|
||||
formatModelProviders
|
||||
} from '@fastgpt/global/core/ai/provider';
|
||||
|
||||
// Preload model providers
|
||||
export async function preloadModelProviders(): Promise<void> {
|
||||
const { modelProviders, aiproxyIdMap } = await loadModelProviders();
|
||||
|
||||
const { ModelProviderListCache, ModelProviderMapCache } = formatModelProviders(modelProviders);
|
||||
global.ModelProviderRawCache = modelProviders;
|
||||
global.ModelProviderListCache = ModelProviderListCache;
|
||||
global.ModelProviderMapCache = ModelProviderMapCache;
|
||||
|
||||
global.aiproxyIdMapCache = aiproxyIdMap;
|
||||
}
|
||||
|
||||
export const getModelProviders = (language = 'en') => {
|
||||
return global.ModelProviderListCache[language as langType] || [];
|
||||
};
|
||||
export const getModelProvider = (provider?: string, language = 'en') => {
|
||||
if (!provider) {
|
||||
return defaultProvider;
|
||||
}
|
||||
|
||||
return ModelProviderMapCache[language as langType][provider] ?? defaultProvider;
|
||||
};
|
||||
|
|
@ -1,36 +1,13 @@
|
|||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { isProduction } from '@fastgpt/global/common/system/constants';
|
||||
import { PluginSourceEnum } from '@fastgpt/global/core/app/plugin/constants';
|
||||
import { MongoAppTemplate } from '@fastgpt/service/core/app/templates/templateSchema';
|
||||
import { type AppTemplateSchemaType } from '@fastgpt/global/core/app/type';
|
||||
|
||||
const getTemplateNameList = () => {
|
||||
const currentFileUrl = new URL(import.meta.url);
|
||||
const filePath = decodeURIComponent(
|
||||
process.platform === 'win32'
|
||||
? currentFileUrl.pathname.substring(1) // Remove leading slash on Windows
|
||||
: currentFileUrl.pathname
|
||||
);
|
||||
const templatesPath = path.join(path.dirname(filePath), 'src');
|
||||
|
||||
return fs.promises.readdir(templatesPath);
|
||||
};
|
||||
import { MongoAppTemplate } from './templateSchema';
|
||||
import { pluginClient } from '../../../thirdProvider/fastgptPlugin';
|
||||
|
||||
const getFileTemplates = async (): Promise<AppTemplateSchemaType[]> => {
|
||||
const templateNames = await getTemplateNameList();
|
||||
|
||||
return Promise.all(
|
||||
templateNames.map<Promise<AppTemplateSchemaType>>(async (name) => {
|
||||
const fileContent = (await import(`./src/${name}/template.json`))?.default;
|
||||
|
||||
return {
|
||||
...fileContent,
|
||||
templateId: `${PluginSourceEnum.community}-${name}`,
|
||||
isActive: true
|
||||
};
|
||||
})
|
||||
);
|
||||
const res = await pluginClient.workflow.getTemplateList();
|
||||
if (res.status === 200) return res.body as AppTemplateSchemaType[];
|
||||
else return Promise.reject(res.body);
|
||||
};
|
||||
|
||||
const getAppTemplates = async () => {
|
||||
|
|
@ -86,3 +63,7 @@ export const getAppTemplatesAndLoadThem = async (refresh = false) => {
|
|||
export const isCommunityTemplate = (templateId: string) => {
|
||||
return templateId.startsWith(PluginSourceEnum.community);
|
||||
};
|
||||
|
||||
declare global {
|
||||
var appTemplates: AppTemplateSchemaType[];
|
||||
}
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
import type { I18nStringStrictType, ToolTypeEnum } from '@fastgpt/global/sdk/fastgpt-plugin';
|
||||
import { RunToolWithStream } from '@fastgpt/global/sdk/fastgpt-plugin';
|
||||
import { PluginSourceEnum } from '@fastgpt/global/core/app/plugin/constants';
|
||||
import { pluginClient, BASE_URL, TOKEN } from '../../../thirdProvider/fastgptPlugin';
|
||||
import { addLog } from '../../../common/system/log';
|
||||
import { retryFn } from '@fastgpt/global/common/system/utils';
|
||||
|
||||
export async function APIGetSystemToolList() {
|
||||
const res = await pluginClient.tool.list();
|
||||
|
|
@ -27,3 +30,24 @@ const runToolInstance = new RunToolWithStream({
|
|||
token: TOKEN
|
||||
});
|
||||
export const APIRunSystemTool = runToolInstance.run.bind(runToolInstance);
|
||||
|
||||
// Tool Types Cache
|
||||
type SystemToolTypeItem = {
|
||||
type: ToolTypeEnum;
|
||||
name: I18nStringStrictType;
|
||||
};
|
||||
|
||||
export const getSystemToolTypes = (): Promise<SystemToolTypeItem[]> => {
|
||||
return retryFn(async () => {
|
||||
const res = await pluginClient.tool.getType();
|
||||
|
||||
if (res.status === 200) {
|
||||
const toolTypes = res.body || [];
|
||||
|
||||
return toolTypes;
|
||||
}
|
||||
|
||||
addLog.error('Get system tool type error', res.body);
|
||||
return [];
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import type {
|
|||
ToolRunResponseItemType
|
||||
} from '@fastgpt/global/core/chat/type.d';
|
||||
import type { NodeOutputKeyEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import { NodeInputKeyEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import { NodeInputKeyEnum, VariableInputEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import {
|
||||
FlowNodeInputTypeEnum,
|
||||
FlowNodeTypeEnum
|
||||
|
|
@ -43,9 +43,10 @@ import type { ChatNodeUsageType } from '@fastgpt/global/support/wallet/bill/type
|
|||
import { addLog } from '../../../common/system/log';
|
||||
import { surrenderProcess } from '../../../common/system/tools';
|
||||
import type { DispatchFlowResponse, WorkflowDebugResponse } from './type';
|
||||
import { removeSystemVariable, rewriteRuntimeWorkFlow } from './utils';
|
||||
import { rewriteRuntimeWorkFlow, removeSystemVariable } from './utils';
|
||||
import { getHandleId } from '@fastgpt/global/core/workflow/utils';
|
||||
import { callbackMap } from './constants';
|
||||
import { anyValueDecrypt } from '../../../common/secret/utils';
|
||||
|
||||
type Props = Omit<ChatDispatchProps, 'workflowDispatchDeep'> & {
|
||||
runtimeNodes: RuntimeNodeItemType[];
|
||||
|
|
@ -147,7 +148,11 @@ export const runWorkflow = async (data: RunWorkflowProps): Promise<DispatchFlowR
|
|||
[DispatchNodeResponseKeyEnum.runTimes]: 1,
|
||||
[DispatchNodeResponseKeyEnum.assistantResponses]: [],
|
||||
[DispatchNodeResponseKeyEnum.toolResponses]: null,
|
||||
newVariables: removeSystemVariable(variables, externalProvider.externalWorkflowVariables),
|
||||
newVariables: removeSystemVariable(
|
||||
variables,
|
||||
externalProvider.externalWorkflowVariables,
|
||||
data.chatConfig?.variables
|
||||
),
|
||||
durationSeconds: 0
|
||||
};
|
||||
}
|
||||
|
|
@ -903,6 +908,12 @@ export const runWorkflow = async (data: RunWorkflowProps): Promise<DispatchFlowR
|
|||
});
|
||||
}
|
||||
|
||||
const encryptedNewVariables = removeSystemVariable(
|
||||
variables,
|
||||
externalProvider.externalWorkflowVariables,
|
||||
data.chatConfig?.variables
|
||||
);
|
||||
|
||||
return {
|
||||
flowResponses: workflowQueue.chatResponses,
|
||||
flowUsages: workflowQueue.chatNodeUsages,
|
||||
|
|
@ -913,10 +924,7 @@ export const runWorkflow = async (data: RunWorkflowProps): Promise<DispatchFlowR
|
|||
workflowQueue.chatAssistantResponse
|
||||
),
|
||||
[DispatchNodeResponseKeyEnum.toolResponses]: workflowQueue.toolRunResponse,
|
||||
[DispatchNodeResponseKeyEnum.newVariables]: removeSystemVariable(
|
||||
variables,
|
||||
externalProvider.externalWorkflowVariables
|
||||
),
|
||||
[DispatchNodeResponseKeyEnum.newVariables]: encryptedNewVariables,
|
||||
[DispatchNodeResponseKeyEnum.memories]:
|
||||
Object.keys(workflowQueue.system_memories).length > 0
|
||||
? workflowQueue.system_memories
|
||||
|
|
@ -937,10 +945,18 @@ const getSystemVariables = ({
|
|||
variables
|
||||
}: Props): SystemVariablesType => {
|
||||
// Get global variables(Label -> key; Key -> key)
|
||||
const globalVariables = chatConfig?.variables || [];
|
||||
const variablesMap = globalVariables.reduce<Record<string, any>>((acc, item) => {
|
||||
const variablesConfig = chatConfig?.variables || [];
|
||||
|
||||
const variablesMap = variablesConfig.reduce<Record<string, any>>((acc, item) => {
|
||||
// For internal variables, ignore external input and use default value
|
||||
if (item.type === VariableInputEnum.password) {
|
||||
const val = variables[item.label] || variables[item.key] || item.defaultValue;
|
||||
const actualValue = anyValueDecrypt(val);
|
||||
acc[item.key] = valueTypeFormat(actualValue, item.valueType);
|
||||
}
|
||||
|
||||
// API
|
||||
if (variables[item.label] !== undefined) {
|
||||
else if (variables[item.label] !== undefined) {
|
||||
acc[item.key] = valueTypeFormat(variables[item.label], item.valueType);
|
||||
}
|
||||
// Web
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ type Response = DispatchNodeResultType<{}>;
|
|||
|
||||
export const dispatchUpdateVariable = async (props: Props): Promise<Response> => {
|
||||
const {
|
||||
chatConfig,
|
||||
params,
|
||||
variables,
|
||||
runtimeNodes,
|
||||
|
|
@ -91,7 +92,11 @@ export const dispatchUpdateVariable = async (props: Props): Promise<Response> =>
|
|||
if (!runningAppInfo.isChildApp) {
|
||||
workflowStreamResponse?.({
|
||||
event: SseResponseEventEnum.updateVariables,
|
||||
data: removeSystemVariable(variables, externalProvider.externalWorkflowVariables)
|
||||
data: removeSystemVariable(
|
||||
variables,
|
||||
externalProvider.externalWorkflowVariables,
|
||||
chatConfig?.variables
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
import { getErrText } from '@fastgpt/global/common/error/utils';
|
||||
import { ChatRoleEnum } from '@fastgpt/global/core/chat/constants';
|
||||
import type { ChatItemType } from '@fastgpt/global/core/chat/type.d';
|
||||
import { NodeOutputKeyEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import { NodeOutputKeyEnum, VariableInputEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import type { VariableItemType } from '@fastgpt/global/core/app/type';
|
||||
import { encryptSecret } from '../../../common/secret/aes256gcm';
|
||||
import {
|
||||
type RuntimeEdgeItemType,
|
||||
type RuntimeNodeItemType,
|
||||
|
|
@ -115,9 +117,12 @@ export const checkQuoteQAValue = (quoteQA?: SearchDataResponseItemType[]) => {
|
|||
/* remove system variable */
|
||||
export const removeSystemVariable = (
|
||||
variables: Record<string, any>,
|
||||
removeObj: Record<string, string> = {}
|
||||
removeObj: Record<string, string> = {},
|
||||
userVariablesConfigs: VariableItemType[] = []
|
||||
) => {
|
||||
const copyVariables = { ...variables };
|
||||
|
||||
// Delete system variables
|
||||
delete copyVariables.userId;
|
||||
delete copyVariables.appId;
|
||||
delete copyVariables.chatId;
|
||||
|
|
@ -125,13 +130,25 @@ export const removeSystemVariable = (
|
|||
delete copyVariables.histories;
|
||||
delete copyVariables.cTime;
|
||||
|
||||
// delete external provider workflow variables
|
||||
// Delete special variables
|
||||
Object.keys(removeObj).forEach((key) => {
|
||||
delete copyVariables[key];
|
||||
});
|
||||
|
||||
// Encrypt password variables
|
||||
userVariablesConfigs.forEach((item) => {
|
||||
const val = copyVariables[item.key];
|
||||
if (item.type === VariableInputEnum.password && typeof val === 'string') {
|
||||
copyVariables[item.key] = {
|
||||
value: '',
|
||||
secret: encryptSecret(val)
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
return copyVariables;
|
||||
};
|
||||
|
||||
export const filterSystemVariables = (variables: Record<string, any>): SystemVariablesType => {
|
||||
return {
|
||||
userId: variables.userId,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { countPromptTokens } from '../../common/string/tiktoken/index';
|
|||
import type { RuntimeNodeItemType } from '@fastgpt/global/core/workflow/runtime/type';
|
||||
import { getSystemPluginByIdAndVersionId, getSystemTools } from '../app/plugin/controller';
|
||||
import { FlowNodeTypeEnum } from '@fastgpt/global/core/workflow/node/constant';
|
||||
import { getNanoid } from '@fastgpt/global/common/string/tools';
|
||||
import { NodeInputKeyEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import { parseI18nString } from '@fastgpt/global/common/i18n/utils';
|
||||
import type { localeType } from '@fastgpt/global/common/i18n/type';
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
import { pluginClient } from '.';
|
||||
|
||||
export const loadModelProviders = async () => {
|
||||
const res = await pluginClient.model.getProviders();
|
||||
|
||||
if (res.status === 200) {
|
||||
return res.body;
|
||||
}
|
||||
|
||||
return Promise.reject(res.body);
|
||||
};
|
||||
|
|
@ -1,24 +1,41 @@
|
|||
import { getWorkerController, WorkerNameEnum } from './utils';
|
||||
|
||||
export const preLoadWorker = async () => {
|
||||
const max = Math.min(Number(global.systemEnv?.tokenWorkers || 30), 100);
|
||||
const start = Date.now();
|
||||
const max = Math.min(Number(global.systemEnv?.tokenWorkers || 30), 500);
|
||||
const workerController = getWorkerController({
|
||||
name: WorkerNameEnum.countGptMessagesTokens,
|
||||
maxReservedThreads: max
|
||||
});
|
||||
|
||||
for await (const item of new Array(max).fill(0)) {
|
||||
const worker = workerController.createWorker();
|
||||
await workerController.run({
|
||||
workerId: worker.id,
|
||||
messages: [
|
||||
{
|
||||
role: 'user',
|
||||
content: '1'
|
||||
}
|
||||
]
|
||||
});
|
||||
console.log(`Preload worker ${workerController.workerQueue.length}`);
|
||||
// Batch size for concurrent loading
|
||||
const batchSize = 5;
|
||||
|
||||
for (let i = 0; i < max; i += batchSize) {
|
||||
const currentBatchSize = Math.min(batchSize, max - i);
|
||||
const promises = [];
|
||||
|
||||
// Create batch of promises for concurrent loading
|
||||
for (let j = 0; j < currentBatchSize; j++) {
|
||||
const promise = (async () => {
|
||||
const worker = workerController.createWorker();
|
||||
await workerController.run({
|
||||
workerId: worker.id,
|
||||
messages: [
|
||||
{
|
||||
role: 'user',
|
||||
content: '1'
|
||||
}
|
||||
]
|
||||
});
|
||||
})();
|
||||
promises.push(promise);
|
||||
}
|
||||
|
||||
// Wait for current batch to complete
|
||||
await Promise.all(promises);
|
||||
console.log('Preload worker', workerController.workerQueue.length);
|
||||
}
|
||||
console.log('Preload worker success');
|
||||
|
||||
console.log('Preload worker success', workerController.workerQueue.length, Date.now() - start);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
# Package 说明
|
||||
|
||||
该 package 存放应用模板。
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"name": "@fastgpt/templates",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@fastgpt/global": "workspace:*",
|
||||
"@fastgpt/service": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,411 +0,0 @@
|
|||
{
|
||||
"name": "问题分类 + 知识库",
|
||||
"intro": "先对用户的问题进行分类,再根据不同类型问题,执行不同的操作",
|
||||
"author": "",
|
||||
"avatar": "core/workflow/template/questionClassify",
|
||||
"tags": ["office-services"],
|
||||
"type": "advanced",
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "userGuide",
|
||||
"name": "系统配置",
|
||||
"intro": "可以配置应用的系统参数",
|
||||
"avatar": "core/workflow/template/systemConfig",
|
||||
"flowNodeType": "userGuide",
|
||||
"position": {
|
||||
"x": 531.2422736065552,
|
||||
"y": -486.7611729549753
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "workflowStartNodeId",
|
||||
"name": "流程开始",
|
||||
"intro": "",
|
||||
"avatar": "core/workflow/template/workflowStart",
|
||||
"flowNodeType": "workflowStart",
|
||||
"position": {
|
||||
"x": 558.4082376415505,
|
||||
"y": 123.72387429194112
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"toolDescription": "用户问题"
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "userChatInput",
|
||||
"key": "userChatInput",
|
||||
"label": "core.module.input.label.user question",
|
||||
"valueType": "string",
|
||||
"type": "FlowNodeOutputTypeEnum.static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "7BdojPlukIQw",
|
||||
"name": "AI 对话",
|
||||
"intro": "AI 大模型对话",
|
||||
"avatar": "core/workflow/template/aiChat",
|
||||
"flowNodeType": "chatNode",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 2701.1267277679685,
|
||||
"y": -767.8956312653042
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "model",
|
||||
"renderTypeList": ["settingLLMModel", "reference"],
|
||||
"label": "core.module.input.label.aiModel",
|
||||
"valueType": "string",
|
||||
"value": "gpt-5"
|
||||
},
|
||||
{
|
||||
"key": "temperature",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 3,
|
||||
"valueType": "number",
|
||||
"min": 0,
|
||||
"max": 10,
|
||||
"step": 1
|
||||
},
|
||||
{
|
||||
"key": "maxToken",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 1950,
|
||||
"valueType": "number",
|
||||
"min": 100,
|
||||
"max": 4000,
|
||||
"step": 50
|
||||
},
|
||||
{
|
||||
"key": "isResponseAnswerText",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": true,
|
||||
"valueType": "boolean"
|
||||
},
|
||||
{
|
||||
"key": "quoteTemplate",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string"
|
||||
},
|
||||
{
|
||||
"key": "quotePrompt",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string"
|
||||
},
|
||||
{
|
||||
"key": "systemPrompt",
|
||||
"renderTypeList": ["textarea", "reference"],
|
||||
"max": 3000,
|
||||
"valueType": "string",
|
||||
"label": "core.ai.Prompt",
|
||||
"description": "core.app.tip.systemPromptTip",
|
||||
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "history",
|
||||
"renderTypeList": ["numberInput", "reference"],
|
||||
"valueType": "chatHistory",
|
||||
"label": "core.module.input.label.chat history",
|
||||
"required": true,
|
||||
"min": 0,
|
||||
"max": 30,
|
||||
"value": 6
|
||||
},
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"toolDescription": "用户问题",
|
||||
"value": ["workflowStartNodeId", "userChatInput"]
|
||||
},
|
||||
{
|
||||
"key": "quoteQA",
|
||||
"renderTypeList": ["settingDatasetQuotePrompt"],
|
||||
"label": "",
|
||||
"debugLabel": "知识库引用",
|
||||
"description": "",
|
||||
"valueType": "datasetQuote",
|
||||
"value": ["MNMMMIjjWyMU", "quoteQA"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "history",
|
||||
"key": "history",
|
||||
"label": "core.module.output.label.New context",
|
||||
"description": "core.module.output.description.New context",
|
||||
"valueType": "chatHistory",
|
||||
"type": "FlowNodeOutputTypeEnum.static"
|
||||
},
|
||||
{
|
||||
"id": "answerText",
|
||||
"key": "answerText",
|
||||
"label": "core.module.output.label.Ai response content",
|
||||
"description": "core.module.output.description.Ai response content",
|
||||
"valueType": "string",
|
||||
"type": "FlowNodeOutputTypeEnum.static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "rvbo634w3AYj",
|
||||
"name": "问题分类",
|
||||
"intro": "根据用户的历史记录和当前问题判断该次提问的类型。可以添加多组问题类型,下面是一个模板例子:\n类型1: 打招呼\n类型2: 关于商品\"使用\"问题\n类型3: 关于商品\"购买\"问题\n类型4: 其他问题",
|
||||
"avatar": "core/workflow/template/questionClassify",
|
||||
"flowNodeType": "classifyQuestion",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1020.9667229609946,
|
||||
"y": -385.0060974413916
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "model",
|
||||
"renderTypeList": ["selectLLMModel", "reference"],
|
||||
"label": "core.module.input.label.aiModel",
|
||||
"required": true,
|
||||
"valueType": "string",
|
||||
"llmModelType": "classify",
|
||||
"value": "gpt-5"
|
||||
},
|
||||
{
|
||||
"key": "systemPrompt",
|
||||
"renderTypeList": ["textarea", "reference"],
|
||||
"max": 3000,
|
||||
"valueType": "string",
|
||||
"label": "core.module.input.label.Background",
|
||||
"description": "core.module.input.description.Background",
|
||||
"placeholder": "core.module.input.placeholder.Classify background",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "history",
|
||||
"renderTypeList": ["numberInput", "reference"],
|
||||
"valueType": "chatHistory",
|
||||
"label": "core.module.input.label.chat history",
|
||||
"required": true,
|
||||
"min": 0,
|
||||
"max": 30,
|
||||
"value": 6
|
||||
},
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"value": ["workflowStartNodeId", "userChatInput"]
|
||||
},
|
||||
{
|
||||
"key": "agents",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": [
|
||||
{
|
||||
"value": "关于电影《星际穿越》的问题",
|
||||
"key": "wqre"
|
||||
},
|
||||
{
|
||||
"value": "打招呼、问候等问题",
|
||||
"key": "sdfa"
|
||||
},
|
||||
{
|
||||
"value": "其他问题",
|
||||
"key": "agex"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "cqResult",
|
||||
"key": "cqResult",
|
||||
"label": "分类结果",
|
||||
"valueType": "string",
|
||||
"type": "FlowNodeOutputTypeEnum.static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "7kwgL1dVlwG6",
|
||||
"name": "指定回复",
|
||||
"intro": "该模块可以直接回复一段指定的内容。常用于引导、提示。非字符串内容传入时,会转成字符串进行输出。",
|
||||
"avatar": "core/workflow/template/reply",
|
||||
"flowNodeType": "answerNode",
|
||||
"position": {
|
||||
"x": 1874.9167551056487,
|
||||
"y": 434.98431875888207
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "text",
|
||||
"renderTypeList": ["textarea", "reference"],
|
||||
"valueType": "string",
|
||||
"label": "core.module.input.label.Response content",
|
||||
"description": "core.module.input.description.Response content",
|
||||
"placeholder": "core.module.input.description.Response content",
|
||||
"selectedTypeIndex": 1,
|
||||
"value": ["rvbo634w3AYj", "cqResult"]
|
||||
}
|
||||
],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "MNMMMIjjWyMU",
|
||||
"name": "知识库搜索",
|
||||
"intro": "调用\"语义检索\"和\"全文检索\"能力,从\"知识库\"中查找可能与问题相关的参考内容",
|
||||
"avatar": "core/workflow/template/datasetSearch",
|
||||
"flowNodeType": "datasetSearchNode",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1851.010152279949,
|
||||
"y": -613.3555232387284
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "datasets",
|
||||
"renderTypeList": ["selectDataset", "reference"],
|
||||
"label": "core.module.input.label.Select dataset",
|
||||
"value": [],
|
||||
"valueType": "selectDataset",
|
||||
"list": [],
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "similarity",
|
||||
"renderTypeList": ["selectDatasetParamsModal"],
|
||||
"label": "",
|
||||
"value": 0.4,
|
||||
"valueType": "number"
|
||||
},
|
||||
{
|
||||
"key": "limit",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 5000,
|
||||
"valueType": "number"
|
||||
},
|
||||
{
|
||||
"key": "searchMode",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string",
|
||||
"value": "embedding"
|
||||
},
|
||||
{
|
||||
"key": "usingReRank",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "boolean",
|
||||
"value": false
|
||||
},
|
||||
{
|
||||
"key": "datasetSearchUsingExtensionQuery",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "boolean",
|
||||
"value": true
|
||||
},
|
||||
{
|
||||
"key": "datasetSearchExtensionModel",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string"
|
||||
},
|
||||
{
|
||||
"key": "datasetSearchExtensionBg",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"toolDescription": "需要检索的内容",
|
||||
"value": ["workflowStartNodeId", "userChatInput"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "quoteQA",
|
||||
"key": "quoteQA",
|
||||
"label": "core.module.Dataset quote.label",
|
||||
"description": "特殊数组格式,搜索结果为空时,返回空数组。",
|
||||
"type": "FlowNodeOutputTypeEnum.static",
|
||||
"valueType": "datasetQuote"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "workflowStartNodeId",
|
||||
"target": "rvbo634w3AYj",
|
||||
"sourceHandle": "workflowStartNodeId-source-right",
|
||||
"targetHandle": "rvbo634w3AYj-target-left"
|
||||
},
|
||||
{
|
||||
"source": "rvbo634w3AYj",
|
||||
"target": "7kwgL1dVlwG6",
|
||||
"sourceHandle": "rvbo634w3AYj-source-agex",
|
||||
"targetHandle": "7kwgL1dVlwG6-target-left"
|
||||
},
|
||||
{
|
||||
"source": "rvbo634w3AYj",
|
||||
"target": "MNMMMIjjWyMU",
|
||||
"sourceHandle": "rvbo634w3AYj-source-wqre",
|
||||
"targetHandle": "MNMMMIjjWyMU-target-left"
|
||||
},
|
||||
{
|
||||
"source": "MNMMMIjjWyMU",
|
||||
"target": "7BdojPlukIQw",
|
||||
"sourceHandle": "MNMMMIjjWyMU-source-right",
|
||||
"targetHandle": "7BdojPlukIQw-target-left"
|
||||
},
|
||||
{
|
||||
"source": "rvbo634w3AYj",
|
||||
"target": "7kwgL1dVlwG6",
|
||||
"sourceHandle": "rvbo634w3AYj-source-sdfa",
|
||||
"targetHandle": "7kwgL1dVlwG6-target-left"
|
||||
}
|
||||
],
|
||||
"chatConfig": {
|
||||
"scheduledTriggerConfig": {
|
||||
"cronString": "",
|
||||
"timezone": "Asia/Shanghai",
|
||||
"defaultPrompt": ""
|
||||
},
|
||||
"welcomeText": "你好,我是知识库助手,请不要忘记选择知识库噢~\n[你是谁]\n[如何使用]"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,507 +0,0 @@
|
|||
{
|
||||
"name": "汉语新解",
|
||||
"intro": "生成汉语释义图",
|
||||
"author": "",
|
||||
"avatar": "core/app/templates/chinese",
|
||||
"tags": ["roleplay"],
|
||||
"type": "advanced",
|
||||
"userGuide": {
|
||||
"type": "link",
|
||||
"content": "https://mp.weixin.qq.com/s/T90-uZqGovYR90fST0o80Q"
|
||||
},
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "userGuide",
|
||||
"name": "common:core.module.template.system_config",
|
||||
"intro": "common:core.module.template.system_config_info",
|
||||
"avatar": "core/workflow/template/systemConfig",
|
||||
"flowNodeType": "userGuide",
|
||||
"position": {
|
||||
"x": 262.2732338817093,
|
||||
"y": -476.00241136598146
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "welcomeText",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"label": "core.app.Welcome Text",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "variables",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "core.app.Chat Variable",
|
||||
"value": []
|
||||
},
|
||||
{
|
||||
"key": "questionGuide",
|
||||
"valueType": "any",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "core.app.Question Guide",
|
||||
"value": {
|
||||
"open": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "tts",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": {
|
||||
"type": "web"
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "whisper",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": {
|
||||
"open": false,
|
||||
"autoSend": false,
|
||||
"autoTTSResponse": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "scheduleTrigger",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": null
|
||||
}
|
||||
],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "448745",
|
||||
"name": "common:core.module.template.work_start",
|
||||
"intro": "",
|
||||
"avatar": "core/workflow/template/workflowStart",
|
||||
"flowNodeType": "workflowStart",
|
||||
"position": {
|
||||
"x": 632.368838596004,
|
||||
"y": -347.7446492944009
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "common:core.module.input.label.user question",
|
||||
"required": true,
|
||||
"toolDescription": "用户问题",
|
||||
"debugLabel": ""
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "userChatInput",
|
||||
"key": "userChatInput",
|
||||
"label": "common:core.module.input.label.user question",
|
||||
"type": "static",
|
||||
"valueType": "string",
|
||||
"description": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "bg853CwHAw4a",
|
||||
"name": "AI 对话",
|
||||
"intro": "AI 大模型对话",
|
||||
"avatar": "core/workflow/template/aiChat",
|
||||
"flowNodeType": "chatNode",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1318.728987052518,
|
||||
"y": -612.0024113659815
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "model",
|
||||
"renderTypeList": ["settingLLMModel", "reference"],
|
||||
"label": "AI 模型",
|
||||
"valueType": "string",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": "",
|
||||
"value": "claude-3-5-sonnet-20240620"
|
||||
},
|
||||
{
|
||||
"key": "temperature",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 0,
|
||||
"valueType": "number",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "maxToken",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 2000,
|
||||
"valueType": "number",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "isResponseAnswerText",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": false,
|
||||
"valueType": "boolean",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "aiChatQuoteRole",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string",
|
||||
"value": "system",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "quoteTemplate",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "quotePrompt",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "aiChatVision",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "boolean",
|
||||
"value": false,
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "systemPrompt",
|
||||
"renderTypeList": ["textarea", "reference"],
|
||||
"max": 3000,
|
||||
"valueType": "string",
|
||||
"label": "提示词",
|
||||
"description": "core.app.tip.chatNodeSystemPromptTip",
|
||||
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": "",
|
||||
"value": "{提示词 START:\n;; 作者: 李继刚\n;; 版本: 0.3\n;; 模型: Claude Sonnet\n;; 用途: 将一个汉语词汇进行全新角度的解释\n\n;; 设定如下内容为你的 *System Prompt*\n(defun 新汉语老师 ()\n \"你是年轻人,批判现实,思考深刻,语言风趣\"\n (风格 . (\"Oscar Wilde\" \"鲁迅\" \"罗永浩\"))\n (擅长 . 一针见血)\n (表达 . 隐喻)\n (批判 . 讽刺幽默))\n\n(defun 汉语新解 (用户输入)\n \"你会用一个特殊视角来解释一个词汇\"\n (let (解释 (精练表达\n (隐喻 (一针见血 (辛辣讽刺 (抓住本质 用户输入))))))\n (few-shots (委婉 . \"刺向他人时, 决定在剑刃上撒上止痛药。\"))\n (SVG-Card 解释)))\n\n(defun SVG-Card (解释)\n \"输出SVG 卡片\"\n (setq design-rule \"合理使用负空间,整体排版要有呼吸感\"\n design-principles '(干净 简洁 典雅))\n\n (设置画布 '(宽度 400 高度 600 边距 20))\n (标题字体 '毛笔楷体)\n (自动缩放 '(最小字号 16))\n\n (配色风格 '((背景色 (蒙德里安风格 设计感)))\n (主要文字 (汇文明朝体 粉笔灰))\n (装饰图案 随机几何图))\n\n (卡片元素 ((居中标题 \"汉语新解\")\n 分隔线\n (排版输出 用户输入 英文 日语)\n 解释\n (线条图 (批判内核 解释))\n (极简总结 线条图))))\n\n(defun start ()\n \"启动时运行\"\n (let (system-role 新汉语老师)\n (print \"说吧, 他们又用哪个词来忽悠你了?\")))\n\n;; 运行规则\n;; 1. 启动时必须运行 (start) 函数\n;; 2. 之后调用主函数 (汉语新解 用户输入)\n提示词 END}\n\n(直接生成 svg 完整代码,我会复制,需要你用代码块)\n(除此之外不要有多余的解释,不要在开头加上任何说明)\n解释的内容自动加入换行标签,例如:\n<tspan x=\"50%\" dy=\"25\" font-size=\"18\" fill=\"#8B4513\">文字1,</tspan>\n <tspan x=\"50%\" dy=\"25\" font-size=\"18\" fill=\"#8B4513\">文字12,</tspan>"
|
||||
},
|
||||
{
|
||||
"key": "history",
|
||||
"renderTypeList": ["numberInput", "reference"],
|
||||
"valueType": "chatHistory",
|
||||
"label": "聊天记录",
|
||||
"description": "workflow:max_dialog_rounds",
|
||||
"required": true,
|
||||
"min": 0,
|
||||
"max": 50,
|
||||
"value": 0,
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "quoteQA",
|
||||
"renderTypeList": ["settingDatasetQuotePrompt"],
|
||||
"label": "",
|
||||
"debugLabel": "知识库引用",
|
||||
"description": "",
|
||||
"valueType": "datasetQuote",
|
||||
"valueDesc": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "stringQuoteText",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"label": "文档引用",
|
||||
"debugLabel": "文档引用",
|
||||
"description": "app:document_quote_tip",
|
||||
"valueType": "string",
|
||||
"valueDesc": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"toolDescription": "用户问题",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"value": ["448745", "userChatInput"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "history",
|
||||
"key": "history",
|
||||
"required": true,
|
||||
"label": "common:core.module.output.label.New context",
|
||||
"description": "将本次回复内容拼接上历史记录,作为新的上下文返回",
|
||||
"valueType": "chatHistory",
|
||||
"valueDesc": "{\n obj: System | Human | AI;\n value: string;\n}[]",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "answerText",
|
||||
"key": "answerText",
|
||||
"required": true,
|
||||
"label": "common:core.module.output.label.Ai response content",
|
||||
"description": "将在 stream 回复完毕后触发",
|
||||
"valueType": "string",
|
||||
"type": "static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "sbVUb0efY6Fm",
|
||||
"name": "代码运行",
|
||||
"intro": "执行一段简单的脚本代码,通常用于进行复杂的数据处理。",
|
||||
"avatar": "core/workflow/template/codeRun",
|
||||
"flowNodeType": "code",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 2210.2574140398733,
|
||||
"y": -621.0024113659815
|
||||
},
|
||||
"version": "482",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "workflow:these_variables_will_be_input_parameters_for_code_execution",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "codeType",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": "js",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "code",
|
||||
"renderTypeList": ["custom"],
|
||||
"label": "",
|
||||
"value": "function main({svg_str}){\n\n // 使用正则表达式匹配代码块中的内容\n const match = svg_str.match(/```[\\w]*\\n([\\s\\S]*?)```/);\n\n if (!match) {\n // 如果没有匹配到代码块,返回一个错误信息或空结果\n return {\n result: null,\n error: \"未找到有效的代码块标记。\"\n };\n }\n\n // 提取代码块中的 SVG 内容\n const extractedSvg = match[1].trim();\n \n const base64 = strToBase64(extractedSvg,'data:image/svg+xml;base64,')\n\n return {\n result: base64\n }\n}",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"valueType": "string",
|
||||
"canEdit": true,
|
||||
"key": "svg_str",
|
||||
"label": "svg_str",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"required": true,
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": "",
|
||||
"value": ["bg853CwHAw4a", "answerText"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "system_rawResponse",
|
||||
"key": "system_rawResponse",
|
||||
"label": "workflow:full_response_data",
|
||||
"valueType": "object",
|
||||
"type": "static",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"id": "error",
|
||||
"key": "error",
|
||||
"label": "workflow:execution_error",
|
||||
"description": "代码运行错误信息,成功时返回空",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"customFieldConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": false
|
||||
},
|
||||
"description": "将代码中 return 的对象作为输出,传递给后续的节点。变量名需要对应 return 的 key",
|
||||
"valueDesc": ""
|
||||
},
|
||||
{
|
||||
"id": "qLUQfhG0ILRX",
|
||||
"type": "dynamic",
|
||||
"key": "result",
|
||||
"valueType": "string",
|
||||
"label": "result",
|
||||
"valueDesc": "",
|
||||
"description": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "cPh2VZnVxjQ8",
|
||||
"name": "指定回复",
|
||||
"intro": "该模块可以直接回复一段指定的内容。常用于引导、提示。非字符串内容传入时,会转成字符串进行输出。",
|
||||
"avatar": "core/workflow/template/reply",
|
||||
"flowNodeType": "answerNode",
|
||||
"position": {
|
||||
"x": 2911.2230784647795,
|
||||
"y": -411.6915940628763
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "text",
|
||||
"renderTypeList": ["textarea", "reference"],
|
||||
"valueType": "any",
|
||||
"required": true,
|
||||
"label": "回复的内容",
|
||||
"description": "common:core.module.input.description.Response content",
|
||||
"placeholder": "common:core.module.input.description.Response content",
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": "",
|
||||
"value": "SVG:\n\n{{$bg853CwHAw4a.answerText$}}\n\n卡片:\n\n"
|
||||
}
|
||||
],
|
||||
"outputs": []
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "bg853CwHAw4a",
|
||||
"target": "sbVUb0efY6Fm",
|
||||
"sourceHandle": "bg853CwHAw4a-source-right",
|
||||
"targetHandle": "sbVUb0efY6Fm-target-left"
|
||||
},
|
||||
{
|
||||
"source": "448745",
|
||||
"target": "bg853CwHAw4a",
|
||||
"sourceHandle": "448745-source-right",
|
||||
"targetHandle": "bg853CwHAw4a-target-left"
|
||||
},
|
||||
{
|
||||
"source": "sbVUb0efY6Fm",
|
||||
"target": "cPh2VZnVxjQ8",
|
||||
"sourceHandle": "sbVUb0efY6Fm-source-right",
|
||||
"targetHandle": "cPh2VZnVxjQ8-target-left"
|
||||
}
|
||||
],
|
||||
"chatConfig": {
|
||||
"variables": [],
|
||||
"scheduledTriggerConfig": {
|
||||
"cronString": "",
|
||||
"timezone": "Asia/Shanghai",
|
||||
"defaultPrompt": ""
|
||||
},
|
||||
"_id": "66f0f7540a40cd1f97da9dd6"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,581 +0,0 @@
|
|||
{
|
||||
"name": "多轮翻译机器人",
|
||||
"intro": "通过 4 轮翻译,提高翻译英文的质量",
|
||||
"author": "",
|
||||
"avatar": "core/app/templates/TranslateRobot",
|
||||
"tags": ["office-services"],
|
||||
"type": "advanced",
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "userGuide",
|
||||
"name": "系统配置",
|
||||
"intro": "可以配置应用的系统参数",
|
||||
"avatar": "/imgs/workflow/userGuide.png",
|
||||
"flowNodeType": "userGuide",
|
||||
"position": {
|
||||
"x": 531.2422736065552,
|
||||
"y": -486.7611729549753
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "welcomeText",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"label": "core.app.Welcome Text",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "variables",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "core.app.Chat Variable",
|
||||
"value": []
|
||||
},
|
||||
{
|
||||
"key": "questionGuide",
|
||||
"valueType": "any",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "core.app.Question Guide",
|
||||
"value": {
|
||||
"open": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "tts",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": {
|
||||
"type": "web"
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "whisper",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": {
|
||||
"open": false,
|
||||
"autoSend": false,
|
||||
"autoTTSResponse": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "scheduleTrigger",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": null
|
||||
}
|
||||
],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "448745",
|
||||
"name": "流程开始",
|
||||
"intro": "",
|
||||
"avatar": "/imgs/workflow/userChatInput.svg",
|
||||
"flowNodeType": "workflowStart",
|
||||
"position": {
|
||||
"x": 558.4082376415505,
|
||||
"y": 123.72387429194112
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"toolDescription": "用户问题"
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "userChatInput",
|
||||
"key": "userChatInput",
|
||||
"label": "core.module.input.label.user question",
|
||||
"type": "static",
|
||||
"valueType": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "loOvhld2ZTKa",
|
||||
"name": "第一轮翻译",
|
||||
"intro": "AI 大模型对话",
|
||||
"avatar": "/imgs/workflow/AI.png",
|
||||
"flowNodeType": "chatNode",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1748.8252410306534,
|
||||
"y": -245.08260685989214
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "model",
|
||||
"renderTypeList": ["settingLLMModel", "reference"],
|
||||
"label": "core.module.input.label.aiModel",
|
||||
"valueType": "string",
|
||||
"value": "claude-3-5-sonnet-20240620"
|
||||
},
|
||||
{
|
||||
"key": "temperature",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 0,
|
||||
"valueType": "number",
|
||||
"min": 0,
|
||||
"max": 10,
|
||||
"step": 1
|
||||
},
|
||||
{
|
||||
"key": "maxToken",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 2000,
|
||||
"valueType": "number",
|
||||
"min": 100,
|
||||
"max": 4000,
|
||||
"step": 50
|
||||
},
|
||||
{
|
||||
"key": "isResponseAnswerText",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": true,
|
||||
"valueType": "boolean"
|
||||
},
|
||||
{
|
||||
"key": "quoteTemplate",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string"
|
||||
},
|
||||
{
|
||||
"key": "quotePrompt",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string"
|
||||
},
|
||||
{
|
||||
"key": "systemPrompt",
|
||||
"renderTypeList": ["textarea", "reference"],
|
||||
"max": 3000,
|
||||
"valueType": "string",
|
||||
"label": "core.ai.Prompt",
|
||||
"description": "core.app.tip.systemPromptTip",
|
||||
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
|
||||
"value": "# Role: 资深英汉翻译专家\n\n## Background:\n你是一位经验丰富的英汉翻译专家,精通英汉互译,尤其擅长将英文文章译成流畅易懂的现代汉语。你曾多次带领团队完成大型翻译项目,译文广受好评。\n\n## Attention:\n- 翻译过程中要始终坚持\"信、达、雅\"的原则,但\"达\"尤为重要\n- 译文要符合现代汉语的表达习惯,通俗易懂,连贯流畅 \n- 避免使用过于文绉绉的表达和晦涩难懂的典故引用\n\n## Profile: \n- Author: 米开朗基杨 \n- Version: 0.2\n- Language: 中文\n- Description: 你是一位资深英汉翻译专家,精通英汉互译。你擅长将英文文章译成地道流畅的现代汉语,表达准确易懂,符合当代中文语言习惯。\n\n## Constraints:\n- 必须严格遵循四轮翻译流程:直译、意译、校审、定稿 \n- 译文要忠实原文,准确无误,不能遗漏或曲解原意\n- 译文应以现代白话文为主,避免过多使用文言文和古典诗词\n- 每一轮翻译前后必须添加【思考】和【翻译】标记\n- 最终译文使用Markdown的代码块呈现\n\n## Goals:\n- 通过四轮翻译流程,将英文原文译成高质量的现代汉语译文 \n- 译文要准确传达原文意思,语言表达力求浅显易懂,朗朗上口\n- 适度使用一些熟语俗语、流行网络用语等,增强译文的亲和力\n- 在直译的基础上,提供至少2个不同风格的意译版本供选择\n\n## Skills:\n- 精通英汉双语,具有扎实的语言功底和丰富的翻译经验\n- 擅长将英语表达习惯转换为地道自然的现代汉语\n- 对当代中文语言的发展变化有敏锐洞察,善于把握语言流行趋势\n\n## Workflow:\n1. 第一轮直译:逐字逐句忠实原文,不遗漏任何信息\n2. 第二轮意译:在直译的基础上用通俗流畅的现代汉语意译原文,至少提供2个不同风格的版本\n3. 第三轮校审:仔细审视译文,消除偏差和欠缺,使译文更加地道易懂 \n4. 第四轮定稿:择优选取,反复修改润色,最终定稿出一个简洁畅达、符合大众阅读习惯的译文\n\n## OutputFormat: \n- 每一轮翻译前用【思考】说明该轮要点\n- 每一轮翻译后用【翻译】呈现译文\n- 在\\`\\`\\`代码块中展示最终定稿译文\n\n## Suggestions:\n- 直译时力求忠实原文,但不要过于拘泥逐字逐句\n- 意译时在准确表达原意的基础上,用最朴实无华的现代汉语来表达 \n- 校审环节重点关注译文是否符合当代汉语表达习惯,是否通俗易懂\n- 定稿时适度采用一些熟语谚语、网络流行语等,使译文更接地气\n- 善于利用中文的灵活性,用不同的表述方式展现同一内容,提高译文的可读性\n\n## Initialization\n作为一名资深英汉翻译专家,你必须严格遵循翻译流程的各项要求。首先请向用户问好,介绍你将带领团队完成翻译任务,力求将英文原文译成通俗易懂的现代汉语。然后简要说明四轮翻译流程,请用户提供英文原文,开始进行翻译工作。"
|
||||
},
|
||||
{
|
||||
"key": "history",
|
||||
"renderTypeList": ["numberInput", "reference"],
|
||||
"valueType": "chatHistory",
|
||||
"label": "core.module.input.label.chat history",
|
||||
"description": "最多携带多少轮对话记录",
|
||||
"required": true,
|
||||
"min": 0,
|
||||
"max": 50,
|
||||
"value": 6
|
||||
},
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"toolDescription": "用户问题",
|
||||
"value": ["gBDvemE4FBhp", "system_text"]
|
||||
},
|
||||
{
|
||||
"key": "quoteQA",
|
||||
"renderTypeList": ["settingDatasetQuotePrompt"],
|
||||
"label": "",
|
||||
"debugLabel": "知识库引用",
|
||||
"description": "",
|
||||
"valueType": "datasetQuote"
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "history",
|
||||
"key": "history",
|
||||
"required": true,
|
||||
"label": "core.module.output.label.New context",
|
||||
"description": "core.module.output.description.New context",
|
||||
"valueType": "chatHistory",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "answerText",
|
||||
"key": "answerText",
|
||||
"required": true,
|
||||
"label": "core.module.output.label.Ai response content",
|
||||
"description": "core.module.output.description.Ai response content",
|
||||
"valueType": "string",
|
||||
"type": "static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "w0oBbQ3YJHye",
|
||||
"name": "代码运行",
|
||||
"intro": "执行一段简单的脚本代码,通常用于进行复杂的数据处理。",
|
||||
"avatar": "/imgs/workflow/code.svg",
|
||||
"flowNodeType": "code",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 2522.61682940854,
|
||||
"y": -79.74569750380468
|
||||
},
|
||||
"version": "482",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "这些变量会作为代码的运行的输入参数",
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
},
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "codeType",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": "js"
|
||||
},
|
||||
{
|
||||
"key": "code",
|
||||
"renderTypeList": ["custom"],
|
||||
"label": "",
|
||||
"value": "function main({data1}) {\n const codeBlocks = data1.match(/```[\\s\\S]*?```/g);\n\n if (codeBlocks && codeBlocks.length > 0) {\n const lastCodeBlock = codeBlocks[codeBlocks.length - 1];\n const cleanedCodeBlock = lastCodeBlock.replace(/```[a-zA-Z]*|```/g, '').trim();\n \n return {\n result: cleanedCodeBlock\n };\n }\n\n return {\n result: '未截取到代码块内容'\n };\n}\n"
|
||||
},
|
||||
{
|
||||
"key": "data1",
|
||||
"valueType": "string",
|
||||
"label": "data1",
|
||||
"renderTypeList": ["reference"],
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
},
|
||||
"value": ["loOvhld2ZTKa", "answerText"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"description": "将代码中 return 的对象作为输出,传递给后续的节点"
|
||||
},
|
||||
{
|
||||
"id": "system_rawResponse",
|
||||
"key": "system_rawResponse",
|
||||
"label": "完整响应数据",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "error",
|
||||
"key": "error",
|
||||
"label": "运行错误",
|
||||
"description": "代码运行错误信息,成功时返回空",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "qLUQfhG0ILRX",
|
||||
"type": "dynamic",
|
||||
"key": "result",
|
||||
"valueType": "string",
|
||||
"label": "result"
|
||||
},
|
||||
{
|
||||
"id": "gR0mkQpJ4Og8",
|
||||
"type": "dynamic",
|
||||
"key": "data2",
|
||||
"valueType": "string",
|
||||
"label": "data2"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "foO69L5FOmDQ",
|
||||
"name": "指定回复",
|
||||
"intro": "该模块可以直接回复一段指定的内容。常用于引导、提示。非字符串内容传入时,会转成字符串进行输出。",
|
||||
"avatar": "/imgs/workflow/reply.png",
|
||||
"flowNodeType": "answerNode",
|
||||
"position": {
|
||||
"x": 3798.4479531204515,
|
||||
"y": 116.03040242110023
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "text",
|
||||
"renderTypeList": ["textarea", "reference"],
|
||||
"valueType": "any",
|
||||
"required": true,
|
||||
"label": "core.module.input.label.Response content",
|
||||
"description": "core.module.input.description.Response content",
|
||||
"placeholder": "core.module.input.description.Response content",
|
||||
"selectedTypeIndex": 1,
|
||||
"value": ["bcqtxqxE2R6o", "system_text"]
|
||||
}
|
||||
],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "gBDvemE4FBhp",
|
||||
"name": "文本拼接",
|
||||
"intro": "可对固定或传入的文本进行加工后输出,非字符串类型数据最终会转成字符串类型。",
|
||||
"avatar": "/imgs/workflow/textEditor.svg",
|
||||
"flowNodeType": "textEditor",
|
||||
"position": {
|
||||
"x": 1031.371061396644,
|
||||
"y": 38.65839420088383
|
||||
},
|
||||
"version": "486",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "可以引用其他节点的输出,作为文本拼接的变量,通过 {{字段名}} 来引用变量",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "system_textareaInput",
|
||||
"renderTypeList": ["textarea"],
|
||||
"valueType": "string",
|
||||
"required": true,
|
||||
"label": "拼接文本",
|
||||
"placeholder": "可通过 {{字段名}} 来引用变量",
|
||||
"value": "原文:\n\"\"\"\n{{q}}\n\"\"\""
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"valueType": "string",
|
||||
"canEdit": true,
|
||||
"key": "q",
|
||||
"label": "q",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": false
|
||||
},
|
||||
"required": true,
|
||||
"value": ["448745", "userChatInput"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "system_text",
|
||||
"key": "system_text",
|
||||
"label": "拼接结果",
|
||||
"type": "static",
|
||||
"valueType": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "bcqtxqxE2R6o",
|
||||
"name": "合并输出结果",
|
||||
"intro": "可对固定或传入的文本进行加工后输出,非字符串类型数据最终会转成字符串类型。",
|
||||
"avatar": "/imgs/workflow/textEditor.svg",
|
||||
"flowNodeType": "textEditor",
|
||||
"position": {
|
||||
"x": 3113.6227559936665,
|
||||
"y": 12.909197647746709
|
||||
},
|
||||
"version": "486",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "可以引用其他节点的输出,作为文本拼接的变量,通过 {{字段名}} 来引用变量",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "system_textareaInput",
|
||||
"renderTypeList": ["textarea"],
|
||||
"valueType": "string",
|
||||
"required": true,
|
||||
"label": "拼接文本",
|
||||
"placeholder": "可通过 {{字段名}} 来引用变量",
|
||||
"value": "****** \n\n最终翻译结果如下: \n\n```\n{{result}}\n```"
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"valueType": "string",
|
||||
"canEdit": true,
|
||||
"key": "result",
|
||||
"label": "result",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": false
|
||||
},
|
||||
"required": true,
|
||||
"value": ["w0oBbQ3YJHye", "qLUQfhG0ILRX"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "system_text",
|
||||
"key": "system_text",
|
||||
"label": "拼接结果",
|
||||
"type": "static",
|
||||
"valueType": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "loOvhld2ZTKa",
|
||||
"target": "w0oBbQ3YJHye",
|
||||
"sourceHandle": "loOvhld2ZTKa-source-right",
|
||||
"targetHandle": "w0oBbQ3YJHye-target-left"
|
||||
},
|
||||
{
|
||||
"source": "448745",
|
||||
"target": "gBDvemE4FBhp",
|
||||
"sourceHandle": "448745-source-right",
|
||||
"targetHandle": "gBDvemE4FBhp-target-left"
|
||||
},
|
||||
{
|
||||
"source": "gBDvemE4FBhp",
|
||||
"target": "loOvhld2ZTKa",
|
||||
"sourceHandle": "gBDvemE4FBhp-source-right",
|
||||
"targetHandle": "loOvhld2ZTKa-target-left"
|
||||
},
|
||||
{
|
||||
"source": "w0oBbQ3YJHye",
|
||||
"target": "bcqtxqxE2R6o",
|
||||
"sourceHandle": "w0oBbQ3YJHye-source-right",
|
||||
"targetHandle": "bcqtxqxE2R6o-target-left"
|
||||
},
|
||||
{
|
||||
"source": "bcqtxqxE2R6o",
|
||||
"target": "foO69L5FOmDQ",
|
||||
"sourceHandle": "bcqtxqxE2R6o-source-right",
|
||||
"targetHandle": "foO69L5FOmDQ-target-left"
|
||||
}
|
||||
],
|
||||
"chatConfig": {
|
||||
"scheduledTriggerConfig": {
|
||||
"cronString": "",
|
||||
"timezone": "Asia/Shanghai",
|
||||
"defaultPrompt": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,196 +0,0 @@
|
|||
{
|
||||
"name": "对话引导 + 变量",
|
||||
"intro": "可以在对话开始发送一段提示,或者让用户填写一些内容,作为本次对话的变量",
|
||||
"author": "",
|
||||
"avatar": "core/workflow/template/systemConfig",
|
||||
"tags": ["office-services"],
|
||||
"type": "simple",
|
||||
"weight": 1,
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "userGuide",
|
||||
"name": "系统配置",
|
||||
"intro": "可以配置应用的系统参数",
|
||||
"avatar": "/imgs/workflow/userGuide.png",
|
||||
"flowNodeType": "userGuide",
|
||||
"position": {
|
||||
"x": 496.57560693988853,
|
||||
"y": -490.7611729549753
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "448745",
|
||||
"name": "流程开始",
|
||||
"intro": "",
|
||||
"avatar": "/imgs/workflow/userChatInput.svg",
|
||||
"flowNodeType": "workflowStart",
|
||||
"position": {
|
||||
"x": 558.4082376415505,
|
||||
"y": 123.72387429194112
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.reference", "FlowNodeInputTypeEnum.textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"toolDescription": "用户问题"
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "userChatInput",
|
||||
"key": "userChatInput",
|
||||
"label": "core.module.input.label.user question",
|
||||
"valueType": "string",
|
||||
"type": "FlowNodeOutputTypeEnum.static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "loOvhld2ZTKa",
|
||||
"name": "AI 对话",
|
||||
"intro": "AI 大模型对话",
|
||||
"avatar": "/imgs/workflow/AI.png",
|
||||
"flowNodeType": "chatNode",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1097.7317280958762,
|
||||
"y": -244.16014496351386
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "model",
|
||||
"renderTypeList": [
|
||||
"FlowNodeInputTypeEnum.settingLLMModel",
|
||||
"FlowNodeInputTypeEnum.reference"
|
||||
],
|
||||
"label": "core.module.input.label.aiModel",
|
||||
"valueType": "string",
|
||||
"value": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"key": "temperature",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
|
||||
"label": "",
|
||||
"value": 0,
|
||||
"valueType": "number",
|
||||
"min": 0,
|
||||
"max": 10,
|
||||
"step": 1
|
||||
},
|
||||
{
|
||||
"key": "maxToken",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
|
||||
"label": "",
|
||||
"value": 2000,
|
||||
"valueType": "number",
|
||||
"min": 100,
|
||||
"max": 4000,
|
||||
"step": 50
|
||||
},
|
||||
{
|
||||
"key": "isResponseAnswerText",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
|
||||
"label": "",
|
||||
"value": true,
|
||||
"valueType": "boolean"
|
||||
},
|
||||
{
|
||||
"key": "quoteTemplate",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
|
||||
"label": "",
|
||||
"valueType": "string"
|
||||
},
|
||||
{
|
||||
"key": "quotePrompt",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
|
||||
"label": "",
|
||||
"valueType": "string"
|
||||
},
|
||||
{
|
||||
"key": "systemPrompt",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.textarea", "FlowNodeInputTypeEnum.reference"],
|
||||
"max": 3000,
|
||||
"valueType": "string",
|
||||
"label": "core.ai.Prompt",
|
||||
"description": "core.app.tip.systemPromptTip",
|
||||
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
|
||||
"value": "请直接将我的问题翻译成{{language}},不需要回答问题。"
|
||||
},
|
||||
{
|
||||
"key": "history",
|
||||
"renderTypeList": [
|
||||
"FlowNodeInputTypeEnum.numberInput",
|
||||
"FlowNodeInputTypeEnum.reference"
|
||||
],
|
||||
"valueType": "chatHistory",
|
||||
"label": "core.module.input.label.chat history",
|
||||
"required": true,
|
||||
"min": 0,
|
||||
"max": 30,
|
||||
"value": 6
|
||||
},
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.reference", "FlowNodeInputTypeEnum.textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"toolDescription": "用户问题",
|
||||
"value": ["448745", "userChatInput"]
|
||||
},
|
||||
{
|
||||
"key": "quoteQA",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.settingDatasetQuotePrompt"],
|
||||
"label": "",
|
||||
"debugLabel": "知识库引用",
|
||||
"description": "",
|
||||
"valueType": "datasetQuote"
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "history",
|
||||
"key": "history",
|
||||
"label": "core.module.output.label.New context",
|
||||
"description": "core.module.output.description.New context",
|
||||
"valueType": "chatHistory",
|
||||
"type": "FlowNodeOutputTypeEnum.static"
|
||||
},
|
||||
{
|
||||
"id": "answerText",
|
||||
"key": "answerText",
|
||||
"label": "core.module.output.label.Ai response content",
|
||||
"description": "core.module.output.description.Ai response content",
|
||||
"valueType": "string",
|
||||
"type": "FlowNodeOutputTypeEnum.static"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "448745",
|
||||
"target": "loOvhld2ZTKa",
|
||||
"sourceHandle": "448745-source-right",
|
||||
"targetHandle": "loOvhld2ZTKa-target-left"
|
||||
}
|
||||
],
|
||||
"chatConfig": {
|
||||
"welcomeText": "你好,我可以为你翻译各种语言,请告诉我你需要翻译成什么语言?",
|
||||
"scheduledTriggerConfig": {
|
||||
"cronString": "",
|
||||
"timezone": "Asia/Shanghai",
|
||||
"defaultPrompt": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,330 +0,0 @@
|
|||
{
|
||||
"name": "Flux 绘图",
|
||||
"intro": "通过请求 Flux 接口绘图,需要有 api key",
|
||||
"author": "",
|
||||
"avatar": "core/app/templates/flux",
|
||||
"type": "plugin",
|
||||
"tags": ["image-generation"],
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "pluginInput",
|
||||
"name": "插件开始",
|
||||
"intro": "可以配置插件需要哪些输入,利用这些输入来运行插件",
|
||||
"avatar": "core/workflow/template/workflowStart",
|
||||
"flowNodeType": "pluginInput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 503.3030871469042,
|
||||
"y": -91.64434154072819
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"selectedTypeIndex": 0,
|
||||
"valueType": "string",
|
||||
"canEdit": true,
|
||||
"key": "绘图提示词",
|
||||
"label": "绘图提示词",
|
||||
"description": "绘图提示词",
|
||||
"required": true,
|
||||
"toolDescription": "绘图提示词"
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "绘图提示词",
|
||||
"valueType": "string",
|
||||
"key": "绘图提示词",
|
||||
"label": "绘图提示词",
|
||||
"type": "hidden"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "pluginOutput",
|
||||
"name": "插件输出",
|
||||
"intro": "自定义配置外部输出,使用插件时,仅暴露自定义配置的输出",
|
||||
"avatar": "core/workflow/template/pluginOutput",
|
||||
"flowNodeType": "pluginOutput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 1876.2082565873427,
|
||||
"y": -110.14434154072819
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"valueType": "string",
|
||||
"canEdit": true,
|
||||
"key": "图片访问链接",
|
||||
"label": "图片访问链接",
|
||||
"description": "",
|
||||
"value": ["tMvel910bnrJ", "pJXgWoTpPoMy"]
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"valueType": "object",
|
||||
"canEdit": true,
|
||||
"key": "error",
|
||||
"label": "错误信息",
|
||||
"description": "",
|
||||
"value": ["tMvel910bnrJ", "error"]
|
||||
}
|
||||
],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "tMvel910bnrJ",
|
||||
"name": "HTTP 请求",
|
||||
"intro": "可以发出一个 HTTP 请求,实现更为复杂的操作(联网搜索、数据库查询等)",
|
||||
"avatar": "core/workflow/template/httpRequest",
|
||||
"flowNodeType": "httpRequest468",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1138.1732435351091,
|
||||
"y": -416.6443415407282
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "common:core.module.input.description.HTTP Dynamic Input",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpMethod",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"value": "POST",
|
||||
"required": true,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpTimeout",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "number",
|
||||
"label": "",
|
||||
"value": 30,
|
||||
"min": 5,
|
||||
"max": 600,
|
||||
"required": true,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpReqUrl",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"description": "common:core.module.input.description.Http Request Url",
|
||||
"placeholder": "https://api.ai.com/getInventory",
|
||||
"required": false,
|
||||
"value": "https://fal.run/fal-ai/flux-pro",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpHeader",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "any",
|
||||
"value": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"type": "string",
|
||||
"value": "Key {{apikey}}"
|
||||
}
|
||||
],
|
||||
"label": "",
|
||||
"description": "common:core.module.input.description.Http Request Header",
|
||||
"placeholder": "common:core.module.input.description.Http Request Header",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpParams",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpJsonBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": "{\n \"prompt\": \"{{prompt}}\",\n \"image_size\": \"landscape_4_3\",\n \"num_inference_steps\": 28,\n \"guidance_scale\": 3.5\n}",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpFormBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpContentType",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"value": "json",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"valueType": "string",
|
||||
"canEdit": true,
|
||||
"key": "prompt",
|
||||
"label": "prompt",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"required": true,
|
||||
"value": ["pluginInput", "绘图提示词"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "error",
|
||||
"key": "error",
|
||||
"label": "workflow:request_error",
|
||||
"description": "HTTP请求错误信息,成功时返回空",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "httpRawResponse",
|
||||
"key": "httpRawResponse",
|
||||
"required": true,
|
||||
"label": "workflow:raw_response",
|
||||
"description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
|
||||
"valueType": "any",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"customFieldConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "pJXgWoTpPoMy",
|
||||
"valueType": "string",
|
||||
"type": "dynamic",
|
||||
"key": "images[0].url",
|
||||
"label": "images[0].url"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "lSYsc889IXDr",
|
||||
"name": "系统配置",
|
||||
"intro": "",
|
||||
"avatar": "core/workflow/template/systemConfig",
|
||||
"flowNodeType": "pluginConfig",
|
||||
"position": {
|
||||
"x": 45.52914573588026,
|
||||
"y": -110.14434154072819
|
||||
},
|
||||
"version": "4811",
|
||||
"inputs": [],
|
||||
"outputs": []
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "pluginInput",
|
||||
"target": "tMvel910bnrJ",
|
||||
"sourceHandle": "pluginInput-source-right",
|
||||
"targetHandle": "tMvel910bnrJ-target-left"
|
||||
},
|
||||
{
|
||||
"source": "tMvel910bnrJ",
|
||||
"target": "pluginOutput",
|
||||
"sourceHandle": "tMvel910bnrJ-source-right",
|
||||
"targetHandle": "pluginOutput-target-left"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,926 +0,0 @@
|
|||
{
|
||||
"name": "GitHub Issue 总结机器人",
|
||||
"intro": "定时获取GitHub Issue信息,使用AI进行总结,并推送到飞书群中",
|
||||
"author": "",
|
||||
"avatar": "core/app/templates/githubIssue",
|
||||
"tags": ["office-services"],
|
||||
"type": "advanced",
|
||||
"userGuide": {
|
||||
"type": "link",
|
||||
"content": "https://mp.weixin.qq.com/s/CBrwSn1jQZO7ybsMSx5GnQ"
|
||||
},
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "userGuide",
|
||||
"name": "common:core.module.template.system_config",
|
||||
"intro": "common:core.module.template.system_config_info",
|
||||
"avatar": "core/workflow/template/systemConfig",
|
||||
"flowNodeType": "userGuide",
|
||||
"position": {
|
||||
"x": 262.2732338817093,
|
||||
"y": -476.00241136598146
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "welcomeText",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"label": "core.app.Welcome Text",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "variables",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "core.app.Chat Variable",
|
||||
"value": []
|
||||
},
|
||||
{
|
||||
"key": "questionGuide",
|
||||
"valueType": "hidden",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "core.app.Question Guide",
|
||||
"value": {
|
||||
"open": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "tts",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": {
|
||||
"type": "web"
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "whisper",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": {
|
||||
"open": false,
|
||||
"autoSend": false,
|
||||
"autoTTSResponse": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "scheduleTrigger",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": null
|
||||
}
|
||||
],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "448745",
|
||||
"name": "common:core.module.template.work_start",
|
||||
"intro": "",
|
||||
"avatar": "core/workflow/template/workflowStart",
|
||||
"flowNodeType": "workflowStart",
|
||||
"position": {
|
||||
"x": 632.368838596004,
|
||||
"y": -347.7446492944009
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "common:core.module.input.label.user question",
|
||||
"required": true,
|
||||
"toolDescription": "用户问题",
|
||||
"debugLabel": ""
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "userChatInput",
|
||||
"key": "userChatInput",
|
||||
"label": "common:core.module.input.label.user question",
|
||||
"type": "static",
|
||||
"valueType": "string",
|
||||
"description": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "jVGuKrDfFTU6",
|
||||
"name": "获取 24 小时前的日期",
|
||||
"intro": "执行一段简单的脚本代码,通常用于进行复杂的数据处理。",
|
||||
"avatar": "core/workflow/template/codeRun",
|
||||
"flowNodeType": "code",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1045.4174257570808,
|
||||
"y": -94.5419824521446
|
||||
},
|
||||
"version": "482",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "workflow:these_variables_will_be_input_parameters_for_code_execution",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "codeType",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": "js",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "code",
|
||||
"renderTypeList": ["custom"],
|
||||
"label": "",
|
||||
"value": "function main() {\n const date = new Date();\n date.setDate(date.getDate() - 3);\n const day = date.getDate();\n const month = date.getMonth() + 1;\n const year = date.getFullYear();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n\n return {\n date: `${year}-${month}-${day}T${hours}:${minutes}:000Z`,\n }\n }",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "system_rawResponse",
|
||||
"key": "system_rawResponse",
|
||||
"label": "workflow:full_response_data",
|
||||
"valueType": "object",
|
||||
"type": "static",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"id": "error",
|
||||
"key": "error",
|
||||
"label": "workflow:execution_error",
|
||||
"description": "代码运行错误信息,成功时返回空",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"customFieldConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": false
|
||||
},
|
||||
"description": "将代码中 return 的对象作为输出,传递给后续的节点。变量名需要对应 return 的 key",
|
||||
"valueDesc": ""
|
||||
},
|
||||
{
|
||||
"id": "gR0mkQpJ4Og8",
|
||||
"type": "dynamic",
|
||||
"key": "date",
|
||||
"valueType": "string",
|
||||
"label": "date",
|
||||
"valueDesc": "",
|
||||
"description": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "jyftFRrd4RQf",
|
||||
"name": "指定回复",
|
||||
"intro": "该模块可以直接回复一段指定的内容。常用于引导、提示。非字符串内容传入时,会转成字符串进行输出。",
|
||||
"avatar": "core/workflow/template/reply",
|
||||
"flowNodeType": "answerNode",
|
||||
"position": {
|
||||
"x": 1758.8251385440858,
|
||||
"y": 80.55020745654087
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "text",
|
||||
"renderTypeList": ["textarea", "reference"],
|
||||
"valueType": "any",
|
||||
"required": true,
|
||||
"label": "回复的内容",
|
||||
"description": "common:core.module.input.description.Response content",
|
||||
"placeholder": "common:core.module.input.description.Response content",
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": "",
|
||||
"value": "拉取从 {{$jVGuKrDfFTU6.gR0mkQpJ4Og8$}} 以来所有的 open issue \\n"
|
||||
}
|
||||
],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "mCaalLpFoZFk",
|
||||
"name": "获取 Issues",
|
||||
"intro": "可以发出一个 HTTP 请求,实现更为复杂的操作(联网搜索、数据库查询等)",
|
||||
"avatar": "core/workflow/template/httpRequest",
|
||||
"flowNodeType": "httpRequest468",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 2602.5615507147536,
|
||||
"y": -67.18952984768578
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "common:core.module.input.description.HTTP Dynamic Input",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpMethod",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"value": "GET",
|
||||
"required": true,
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpTimeout",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "number",
|
||||
"label": "",
|
||||
"value": 30,
|
||||
"min": 5,
|
||||
"max": 600,
|
||||
"required": true,
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpReqUrl",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"description": "common:core.module.input.description.Http Request Url",
|
||||
"placeholder": "https://api.ai.com/getInventory",
|
||||
"required": false,
|
||||
"value": "https://api.github.com/repos/labring/FastGPT/issues",
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpHeader",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"description": "common:core.module.input.description.Http Request Header",
|
||||
"placeholder": "common:core.module.input.description.Http Request Header",
|
||||
"required": false,
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpParams",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": [
|
||||
{
|
||||
"key": "state",
|
||||
"type": "string",
|
||||
"value": "open"
|
||||
},
|
||||
{
|
||||
"key": "since",
|
||||
"type": "string",
|
||||
"value": "{{$jVGuKrDfFTU6.gR0mkQpJ4Og8$}}"
|
||||
}
|
||||
],
|
||||
"label": "",
|
||||
"required": false,
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpJsonBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": "",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpFormBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"required": false,
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpContentType",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"value": "json",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "error",
|
||||
"key": "error",
|
||||
"label": "workflow:request_error",
|
||||
"description": "HTTP请求错误信息,成功时返回空",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "httpRawResponse",
|
||||
"key": "httpRawResponse",
|
||||
"required": true,
|
||||
"label": "workflow:raw_response",
|
||||
"description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
|
||||
"valueType": "any",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"customFieldConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": false
|
||||
},
|
||||
"valueDesc": "",
|
||||
"description": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "gALvyJcXPoep",
|
||||
"name": "处理 API 响应数据",
|
||||
"intro": "执行一段简单的脚本代码,通常用于进行复杂的数据处理。",
|
||||
"avatar": "core/workflow/template/codeRun",
|
||||
"flowNodeType": "code",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 3396.722564475613,
|
||||
"y": -80.79235153344955
|
||||
},
|
||||
"version": "482",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "workflow:these_variables_will_be_input_parameters_for_code_execution",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "codeType",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": "js",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "code",
|
||||
"renderTypeList": ["custom"],
|
||||
"label": "",
|
||||
"value": "function main({res}) {\n const issues = JSON.parse(res);\n const ret = [];\n for(const issue of issues) {\n if (issue.pull_request) continue;\n ret.push({\n title: issue.title,\n body: issue.body,\n url: issue.html_url\n })\n }\n\n return {\n ret: JSON.stringify(ret)\n }\n}",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"valueType": "string",
|
||||
"canEdit": true,
|
||||
"key": "res",
|
||||
"label": "res",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"required": true,
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": "",
|
||||
"value": ["mCaalLpFoZFk", "httpRawResponse"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "system_rawResponse",
|
||||
"key": "system_rawResponse",
|
||||
"label": "workflow:full_response_data",
|
||||
"valueType": "object",
|
||||
"type": "static",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"id": "error",
|
||||
"key": "error",
|
||||
"label": "workflow:execution_error",
|
||||
"description": "代码运行错误信息,成功时返回空",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"customFieldConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": false
|
||||
},
|
||||
"description": "将代码中 return 的对象作为输出,传递给后续的节点。变量名需要对应 return 的 key",
|
||||
"valueDesc": ""
|
||||
},
|
||||
{
|
||||
"id": "qLUQfhG0ILRX",
|
||||
"type": "dynamic",
|
||||
"key": "ret",
|
||||
"valueType": "string",
|
||||
"label": "ret",
|
||||
"valueDesc": "",
|
||||
"description": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "aLrp6IjV8zAf",
|
||||
"name": "AI 对话",
|
||||
"intro": "AI 大模型对话",
|
||||
"avatar": "core/workflow/template/aiChat",
|
||||
"flowNodeType": "chatNode",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 3907.7186093895143,
|
||||
"y": -148.24856757598377
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "model",
|
||||
"renderTypeList": ["settingLLMModel", "reference"],
|
||||
"label": "AI 模型",
|
||||
"valueType": "string",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": "",
|
||||
"value": "qwen-plus"
|
||||
},
|
||||
{
|
||||
"key": "temperature",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 0,
|
||||
"valueType": "number",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "maxToken",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 8000,
|
||||
"valueType": "number",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "isResponseAnswerText",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": true,
|
||||
"valueType": "boolean",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "aiChatQuoteRole",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string",
|
||||
"value": "system",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "quoteTemplate",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "quotePrompt",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "aiChatVision",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "boolean",
|
||||
"value": false,
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "systemPrompt",
|
||||
"renderTypeList": ["textarea", "reference"],
|
||||
"max": 3000,
|
||||
"valueType": "string",
|
||||
"label": "提示词",
|
||||
"description": "core.app.tip.systemPromptTip",
|
||||
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": "",
|
||||
"value": "你是一个简洁高效的 GitHub Issue 概述助手,专长于提炼核心问题并以清晰简洁的方式呈现。\n\n## 任务\n分析输入的多条 issue 信息,为每个 issue 创建一个简明扼要的概述。使用中文输出。\n\n## 输入格式\nJSON 数组,每项包含 title(标题)、body(内容)和 url(链接)。\n\n## 输出格式\n对每个 issue 使用 Markdown 语法创建简洁的概述块。每个概述应包含:\n\n1. 使用加粗呈现 issue 的原标题\n2. 一段简短的问题概述(不超过 2-3 句话)\n3. 原 issue 的链接(使用 Markdown 链接语法)\n\n在概述中适当使用 emoji 来增加可读性,但不要过度使用。保持整体风格简洁明了。\n\n示例输出:\n\n---\n\n**🔍 数据可视化组件性能优化**\n\n这个 issue 反映了在处理大量数据时图表加载缓慢的问题。用户在数据点超过一定数量时experiencing明显的性能下降,影响了用户体验。\n\n📎 [查看原 issue](url1)\n\n---\n\n**🐞 移动端界面适配问题**\n\n该 issue 指出在某些特定型号的移动设备上出现了界面布局错乱的情况。这个问题影响了应用在不同尺寸屏幕上的一致性展现。\n\n📎 [查看原 issue](url2)\n\n---\n\n请确保每个 issue 概述都简洁明了,突出核心问题,避免过多细节。保持整体风格统一,让读者能快速理解每个 issue 的要点。"
|
||||
},
|
||||
{
|
||||
"key": "history",
|
||||
"renderTypeList": ["numberInput", "reference"],
|
||||
"valueType": "chatHistory",
|
||||
"label": "聊天记录",
|
||||
"description": "workflow:max_dialog_rounds",
|
||||
"required": true,
|
||||
"min": 0,
|
||||
"max": 50,
|
||||
"value": 0,
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "quoteQA",
|
||||
"renderTypeList": ["settingDatasetQuotePrompt"],
|
||||
"label": "",
|
||||
"debugLabel": "知识库引用",
|
||||
"description": "",
|
||||
"valueType": "datasetQuote",
|
||||
"valueDesc": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "stringQuoteText",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"label": "文档引用",
|
||||
"debugLabel": "文档引用",
|
||||
"description": "app:document_quote_tip",
|
||||
"valueType": "string",
|
||||
"valueDesc": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"toolDescription": "用户问题",
|
||||
"required": true,
|
||||
"value": ["gALvyJcXPoep", "qLUQfhG0ILRX"],
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": ""
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "history",
|
||||
"key": "history",
|
||||
"required": true,
|
||||
"label": "common:core.module.output.label.New context",
|
||||
"description": "将本次回复内容拼接上历史记录,作为新的上下文返回",
|
||||
"valueType": "chatHistory",
|
||||
"valueDesc": "{\n obj: System | Human | AI;\n value: string;\n}[]",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "answerText",
|
||||
"key": "answerText",
|
||||
"required": true,
|
||||
"label": "common:core.module.output.label.Ai response content",
|
||||
"description": "将在 stream 回复完毕后触发",
|
||||
"valueType": "string",
|
||||
"type": "static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "jmSiT6OXA3Fe",
|
||||
"name": "飞书机器人 webhook",
|
||||
"intro": "向飞书机器人发起 webhook 请求。",
|
||||
"avatar": "/appMarketTemplates/plugin-feishu/avatar.svg",
|
||||
"flowNodeType": "pluginModule",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 4682.428295424065,
|
||||
"y": 120.04658236877646
|
||||
},
|
||||
"version": "488",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_forbid_stream",
|
||||
"renderTypeList": ["switch"],
|
||||
"valueType": "boolean",
|
||||
"label": "禁用流输出",
|
||||
"description": "强制设置嵌套运行的应用,均以非流模式运行",
|
||||
"value": true,
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"selectedTypeIndex": 0,
|
||||
"valueType": "string",
|
||||
"canEdit": false,
|
||||
"key": "content",
|
||||
"label": "content",
|
||||
"description": "需要发送的消息",
|
||||
"required": true,
|
||||
"toolDescription": "需要发送的消息",
|
||||
"value": ["aLrp6IjV8zAf", "answerText"],
|
||||
"valueDesc": "",
|
||||
"debugLabel": ""
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["input"],
|
||||
"selectedTypeIndex": 0,
|
||||
"valueType": "string",
|
||||
"canEdit": false,
|
||||
"key": "hook_url",
|
||||
"label": "hook_url",
|
||||
"description": "飞书机器人地址",
|
||||
"required": true,
|
||||
"defaultValue": "",
|
||||
"value": "https://www.feishu.cn/flow/api/trigger-webhook/5a1657d6f024c639e1e9af4d9d611292",
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "result",
|
||||
"type": "static",
|
||||
"key": "result",
|
||||
"valueType": "object",
|
||||
"label": "result",
|
||||
"description": "",
|
||||
"valueDesc": ""
|
||||
}
|
||||
],
|
||||
"pluginId": "community-feishu"
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "448745",
|
||||
"target": "jVGuKrDfFTU6",
|
||||
"sourceHandle": "448745-source-right",
|
||||
"targetHandle": "jVGuKrDfFTU6-target-left"
|
||||
},
|
||||
{
|
||||
"source": "jVGuKrDfFTU6",
|
||||
"target": "jyftFRrd4RQf",
|
||||
"sourceHandle": "jVGuKrDfFTU6-source-right",
|
||||
"targetHandle": "jyftFRrd4RQf-target-left"
|
||||
},
|
||||
{
|
||||
"source": "jyftFRrd4RQf",
|
||||
"target": "mCaalLpFoZFk",
|
||||
"sourceHandle": "jyftFRrd4RQf-source-right",
|
||||
"targetHandle": "mCaalLpFoZFk-target-left"
|
||||
},
|
||||
{
|
||||
"source": "mCaalLpFoZFk",
|
||||
"target": "gALvyJcXPoep",
|
||||
"sourceHandle": "mCaalLpFoZFk-source-right",
|
||||
"targetHandle": "gALvyJcXPoep-target-left"
|
||||
},
|
||||
{
|
||||
"source": "gALvyJcXPoep",
|
||||
"target": "aLrp6IjV8zAf",
|
||||
"sourceHandle": "gALvyJcXPoep-source-right",
|
||||
"targetHandle": "aLrp6IjV8zAf-target-left"
|
||||
},
|
||||
{
|
||||
"source": "aLrp6IjV8zAf",
|
||||
"target": "jmSiT6OXA3Fe",
|
||||
"sourceHandle": "aLrp6IjV8zAf-source-right",
|
||||
"targetHandle": "jmSiT6OXA3Fe-target-left"
|
||||
}
|
||||
],
|
||||
"chatConfig": {
|
||||
"variables": [],
|
||||
"scheduledTriggerConfig": {
|
||||
"cronString": "",
|
||||
"timezone": "Asia/Shanghai",
|
||||
"defaultPrompt": ""
|
||||
},
|
||||
"_id": "67152011bb78889107c3a4ec"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,443 +0,0 @@
|
|||
{
|
||||
"name": "谷歌搜索",
|
||||
"intro": "通过请求谷歌搜索,查询相关内容作为模型的参考。",
|
||||
"author": "",
|
||||
"avatar": "core/app/templates/google",
|
||||
"tags": ["recommendation", "web-search"],
|
||||
"type": "advanced",
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "userGuide",
|
||||
"name": "系统配置",
|
||||
"intro": "可以配置应用的系统参数",
|
||||
"avatar": "/imgs/workflow/userGuide.png",
|
||||
"flowNodeType": "userGuide",
|
||||
"position": {
|
||||
"x": 262.2732338817093,
|
||||
"y": -476.00241136598146
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "welcomeText",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"label": "core.app.Welcome Text",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "variables",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "core.app.Chat Variable",
|
||||
"value": []
|
||||
},
|
||||
{
|
||||
"key": "questionGuide",
|
||||
"valueType": "any",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "core.app.Question Guide",
|
||||
"value": {
|
||||
"open": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "tts",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": {
|
||||
"type": "web"
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "whisper",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": {
|
||||
"open": false,
|
||||
"autoSend": false,
|
||||
"autoTTSResponse": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "scheduleTrigger",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": null
|
||||
}
|
||||
],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "448745",
|
||||
"name": "流程开始",
|
||||
"intro": "",
|
||||
"avatar": "/imgs/workflow/userChatInput.svg",
|
||||
"flowNodeType": "workflowStart",
|
||||
"position": {
|
||||
"x": 295.8944548701009,
|
||||
"y": 110.81336038514848
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"toolDescription": "用户问题"
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "userChatInput",
|
||||
"key": "userChatInput",
|
||||
"label": "core.module.input.label.user question",
|
||||
"valueType": "string",
|
||||
"type": "static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "NOgbnBzUwDgT",
|
||||
"name": "工具调用",
|
||||
"intro": "通过AI模型自动选择一个或多个功能块进行调用,也可以对插件进行调用。",
|
||||
"avatar": "/imgs/workflow/tool.svg",
|
||||
"flowNodeType": "tools",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1028.8358722416106,
|
||||
"y": -500.8755882990822
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "model",
|
||||
"renderTypeList": ["settingLLMModel", "reference"],
|
||||
"label": "core.module.input.label.aiModel",
|
||||
"valueType": "string",
|
||||
"llmModelType": "all",
|
||||
"value": "FastAI-plus"
|
||||
},
|
||||
{
|
||||
"key": "temperature",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 0,
|
||||
"valueType": "number",
|
||||
"min": 0,
|
||||
"max": 10,
|
||||
"step": 1
|
||||
},
|
||||
{
|
||||
"key": "maxToken",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 2000,
|
||||
"valueType": "number",
|
||||
"min": 100,
|
||||
"max": 4000,
|
||||
"step": 50
|
||||
},
|
||||
{
|
||||
"key": "systemPrompt",
|
||||
"renderTypeList": ["textarea", "reference"],
|
||||
"max": 3000,
|
||||
"valueType": "string",
|
||||
"label": "core.ai.Prompt",
|
||||
"description": "core.app.tip.systemPromptTip",
|
||||
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "history",
|
||||
"renderTypeList": ["numberInput", "reference"],
|
||||
"valueType": "chatHistory",
|
||||
"label": "core.module.input.label.chat history",
|
||||
"description": "最多携带多少轮对话记录",
|
||||
"required": true,
|
||||
"min": 0,
|
||||
"max": 30,
|
||||
"value": 6
|
||||
},
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"value": ["448745", "userChatInput"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "NodeOutputKeyEnum.answerText",
|
||||
"key": "NodeOutputKeyEnum.answerText",
|
||||
"label": "core.module.output.label.Ai response content",
|
||||
"description": "core.module.output.description.Ai response content",
|
||||
"valueType": "string",
|
||||
"type": "FlowNodeOutputTypeEnum.static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "GMELVPxHfpg5",
|
||||
"name": "HTTP 请求",
|
||||
"intro": "调用谷歌搜索,查询相关内容",
|
||||
"avatar": "/imgs/workflow/http.png",
|
||||
"flowNodeType": "httpRequest468",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1005.4777753640342,
|
||||
"y": 319.4905539380939
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "core.module.input.description.HTTP Dynamic Input"
|
||||
},
|
||||
{
|
||||
"valueType": "string",
|
||||
"renderTypeList": ["reference"],
|
||||
"key": "query",
|
||||
"label": "query",
|
||||
"toolDescription": "谷歌搜索检索词",
|
||||
"required": true,
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"description": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "system_httpMethod",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"value": "GET",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "system_httpReqUrl",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"description": "core.module.input.description.Http Request Url",
|
||||
"placeholder": "https://api.ai.com/getInventory",
|
||||
"required": false,
|
||||
"value": "https://www.googleapis.com/customsearch/v1"
|
||||
},
|
||||
{
|
||||
"key": "system_httpHeader",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"description": "core.module.input.description.Http Request Header",
|
||||
"placeholder": "core.module.input.description.Http Request Header",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "system_httpParams",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": [
|
||||
{
|
||||
"key": "q",
|
||||
"type": "string",
|
||||
"value": "{{query}}"
|
||||
},
|
||||
{
|
||||
"key": "cx",
|
||||
"type": "string",
|
||||
"value": "谷歌搜索cxID"
|
||||
},
|
||||
{
|
||||
"key": "key",
|
||||
"type": "string",
|
||||
"value": "谷歌搜索key"
|
||||
},
|
||||
{
|
||||
"key": "c2coff",
|
||||
"type": "string",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"key": "start",
|
||||
"type": "string",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"key": "end",
|
||||
"type": "string",
|
||||
"value": "20"
|
||||
},
|
||||
{
|
||||
"key": "dateRestrict",
|
||||
"type": "string",
|
||||
"value": "m[1]"
|
||||
}
|
||||
],
|
||||
"label": "",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "system_httpJsonBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": "",
|
||||
"label": "",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "httpRawResponse",
|
||||
"key": "httpRawResponse",
|
||||
"label": "原始响应",
|
||||
"description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
|
||||
"valueType": "any",
|
||||
"type": "static",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"id": "M5YmxaYe8em1",
|
||||
"type": "dynamic",
|
||||
"key": "prompt",
|
||||
"valueType": "string",
|
||||
"label": "prompt"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "poIbrrA8aiR0",
|
||||
"name": "代码运行",
|
||||
"intro": "执行一段简单的脚本代码,通常用于进行复杂的数据处理。",
|
||||
"avatar": "/imgs/workflow/code.svg",
|
||||
"flowNodeType": "code",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1711.805344753384,
|
||||
"y": 650.1023414708576
|
||||
},
|
||||
"version": "482",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "这些变量会作为代码的运行的输入参数",
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "data",
|
||||
"valueType": "object",
|
||||
"label": "data",
|
||||
"renderTypeList": ["reference"],
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
},
|
||||
"value": ["GMELVPxHfpg5", "httpRawResponse"]
|
||||
},
|
||||
{
|
||||
"key": "codeType",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": "js"
|
||||
},
|
||||
{
|
||||
"key": "code",
|
||||
"renderTypeList": ["custom"],
|
||||
"label": "",
|
||||
"value": "function main({data}){\n const result = data.items.map((item) => ({\n title: item.title,\n link: item.link,\n snippet: item.snippet\n }))\n return { prompt: JSON.stringify(result) }\n}"
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
},
|
||||
"description": "将代码中 return 的对象作为输出,传递给后续的节点"
|
||||
},
|
||||
{
|
||||
"id": "system_rawResponse",
|
||||
"key": "system_rawResponse",
|
||||
"label": "完整响应数据",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "error",
|
||||
"key": "error",
|
||||
"label": "运行错误",
|
||||
"description": "代码运行错误信息,成功时返回空",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "qLUQfhG0ILRX",
|
||||
"type": "dynamic",
|
||||
"key": "prompt",
|
||||
"valueType": "string",
|
||||
"label": "prompt"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "448745",
|
||||
"target": "NOgbnBzUwDgT",
|
||||
"sourceHandle": "448745-source-right",
|
||||
"targetHandle": "NOgbnBzUwDgT-target-left"
|
||||
},
|
||||
{
|
||||
"source": "NOgbnBzUwDgT",
|
||||
"target": "GMELVPxHfpg5",
|
||||
"sourceHandle": "selectedTools",
|
||||
"targetHandle": "selectedTools"
|
||||
},
|
||||
{
|
||||
"source": "GMELVPxHfpg5",
|
||||
"target": "poIbrrA8aiR0",
|
||||
"sourceHandle": "GMELVPxHfpg5-source-right",
|
||||
"targetHandle": "poIbrrA8aiR0-target-left"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,330 +0,0 @@
|
|||
{
|
||||
"name": "Dalle3 绘图",
|
||||
"intro": "通过请求 Dalle3 接口绘图,需要有 api key",
|
||||
"author": "",
|
||||
"avatar": "core/app/templates/plugin-dalle",
|
||||
"type": "plugin",
|
||||
"tags": ["recommendation", "image-generation"],
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "pluginInput",
|
||||
"name": "插件开始",
|
||||
"intro": "可以配置插件需要哪些输入,利用这些输入来运行插件",
|
||||
"avatar": "core/workflow/template/workflowStart",
|
||||
"flowNodeType": "pluginInput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 421.97302886868476,
|
||||
"y": -89.7785530936485
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"selectedTypeIndex": 0,
|
||||
"valueType": "string",
|
||||
"canEdit": true,
|
||||
"key": "绘图提示词",
|
||||
"label": "绘图提示词",
|
||||
"description": "绘图提示词",
|
||||
"required": true,
|
||||
"toolDescription": "绘图提示词"
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "绘图提示词",
|
||||
"valueType": "string",
|
||||
"key": "绘图提示词",
|
||||
"label": "绘图提示词",
|
||||
"type": "hidden"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "pluginOutput",
|
||||
"name": "插件输出",
|
||||
"intro": "自定义配置外部输出,使用插件时,仅暴露自定义配置的输出",
|
||||
"avatar": "core/workflow/template/pluginOutput",
|
||||
"flowNodeType": "pluginOutput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 1785.9300180845394,
|
||||
"y": -108.2785530936485
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"valueType": "string",
|
||||
"canEdit": true,
|
||||
"key": "图片访问链接",
|
||||
"label": "图片访问链接",
|
||||
"description": "",
|
||||
"value": ["tMvel910bnrJ", "pJXgWoTpPoMy"]
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"valueType": "object",
|
||||
"canEdit": true,
|
||||
"key": "error",
|
||||
"label": "错误信息",
|
||||
"description": "",
|
||||
"value": ["tMvel910bnrJ", "error"]
|
||||
}
|
||||
],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "tMvel910bnrJ",
|
||||
"name": "HTTP 请求",
|
||||
"intro": "可以发出一个 HTTP 请求,实现更为复杂的操作(联网搜索、数据库查询等)",
|
||||
"avatar": "core/workflow/template/httpRequest",
|
||||
"flowNodeType": "httpRequest468",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1044.8838211811253,
|
||||
"y": -414.7785530936485
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "common:core.module.input.description.HTTP Dynamic Input",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpMethod",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"value": "POST",
|
||||
"required": true,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpTimeout",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "number",
|
||||
"label": "",
|
||||
"value": 30,
|
||||
"min": 5,
|
||||
"max": 600,
|
||||
"required": true,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpReqUrl",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"description": "common:core.module.input.description.Http Request Url",
|
||||
"placeholder": "https://api.ai.com/getInventory",
|
||||
"required": false,
|
||||
"value": "https://api.openai.com/v1/images/generations",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpHeader",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "any",
|
||||
"value": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"type": "string",
|
||||
"value": "Bearer {{authorization}}"
|
||||
}
|
||||
],
|
||||
"label": "",
|
||||
"description": "common:core.module.input.description.Http Request Header",
|
||||
"placeholder": "common:core.module.input.description.Http Request Header",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpParams",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpJsonBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": "{\n \"model\": \"dall-e-3\",\n \"prompt\": \"{{prompt}}\",\n \"n\": 1,\n \"size\": \"1024x1024\"\n}",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpFormBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpContentType",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"value": "json",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"valueType": "string",
|
||||
"canEdit": true,
|
||||
"key": "prompt",
|
||||
"label": "prompt",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"required": true,
|
||||
"value": ["pluginInput", "绘图提示词"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "error",
|
||||
"key": "error",
|
||||
"label": "workflow:request_error",
|
||||
"description": "HTTP请求错误信息,成功时返回空",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "httpRawResponse",
|
||||
"key": "httpRawResponse",
|
||||
"required": true,
|
||||
"label": "workflow:raw_response",
|
||||
"description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
|
||||
"valueType": "any",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"customFieldConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "pJXgWoTpPoMy",
|
||||
"valueType": "string",
|
||||
"type": "dynamic",
|
||||
"key": "data[0].url",
|
||||
"label": "data[0].url"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "c7tRU2qAQoAf",
|
||||
"name": "系统配置",
|
||||
"intro": "",
|
||||
"avatar": "core/workflow/template/systemConfig",
|
||||
"flowNodeType": "pluginConfig",
|
||||
"position": {
|
||||
"x": -46.476647046261974,
|
||||
"y": -89.7785530936485
|
||||
},
|
||||
"version": "4811",
|
||||
"inputs": [],
|
||||
"outputs": []
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "pluginInput",
|
||||
"target": "tMvel910bnrJ",
|
||||
"sourceHandle": "pluginInput-source-right",
|
||||
"targetHandle": "tMvel910bnrJ-target-left"
|
||||
},
|
||||
{
|
||||
"source": "tMvel910bnrJ",
|
||||
"target": "pluginOutput",
|
||||
"sourceHandle": "tMvel910bnrJ-source-right",
|
||||
"targetHandle": "pluginOutput-target-left"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,355 +0,0 @@
|
|||
{
|
||||
"name": "飞书 webhook 插件",
|
||||
"intro": "通过 webhook 给飞书机器人发送一条消息",
|
||||
"author": "",
|
||||
"avatar": "core/app/templates/plugin-feishu",
|
||||
"type": "plugin",
|
||||
"tags": ["recommendation", "office-services"],
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "pluginInput",
|
||||
"name": "插件开始",
|
||||
"intro": "自定义配置外部输入,使用插件时,仅暴露自定义配置的输入",
|
||||
"avatar": "core/workflow/template/workflowStart",
|
||||
"flowNodeType": "pluginInput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 535.7465806305546,
|
||||
"y": -201.26482361861054
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"inputType": "input",
|
||||
"valueType": "string",
|
||||
"key": "飞书机器人地址",
|
||||
"label": "飞书机器人地址",
|
||||
"description": "",
|
||||
"isToolInput": false,
|
||||
"defaultValue": "",
|
||||
"editField": {
|
||||
"key": true
|
||||
},
|
||||
"dynamicParamDefaultValue": {
|
||||
"inputType": "reference",
|
||||
"valueType": "string",
|
||||
"required": true
|
||||
},
|
||||
"renderTypeList": ["input"],
|
||||
"required": true,
|
||||
"canEdit": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "发送的消息",
|
||||
"valueType": "string",
|
||||
"label": "发送的消息",
|
||||
"renderTypeList": ["reference"],
|
||||
"required": true,
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"value": "",
|
||||
"editField": {
|
||||
"key": true
|
||||
},
|
||||
"dynamicParamDefaultValue": {
|
||||
"inputType": "reference",
|
||||
"valueType": "string",
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "mv52BrPVE6bm",
|
||||
"key": "飞书机器人地址",
|
||||
"valueType": "string",
|
||||
"label": "飞书机器人地址",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "p0m68Dv5KaIp",
|
||||
"key": "发送的消息",
|
||||
"valueType": "string",
|
||||
"label": "发送的消息",
|
||||
"type": "static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "pluginOutput",
|
||||
"name": "插件输出",
|
||||
"intro": "自定义配置外部输出,使用插件时,仅暴露自定义配置的输出",
|
||||
"avatar": "core/workflow/template/pluginOutput",
|
||||
"flowNodeType": "pluginOutput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 1776.027569211593,
|
||||
"y": -58.264823618610535
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "rKBYGQuYefae",
|
||||
"name": "HTTP 请求",
|
||||
"intro": "可以发出一个 HTTP 请求,实现更为复杂的操作(联网搜索、数据库查询等)",
|
||||
"avatar": "core/workflow/template/httpRequest",
|
||||
"flowNodeType": "httpRequest468",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1069.7228495148624,
|
||||
"y": -392.26482361861054
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "common:core.module.input.description.HTTP Dynamic Input",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpMethod",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"value": "POST",
|
||||
"required": true,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpTimeout",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "number",
|
||||
"label": "",
|
||||
"value": 30,
|
||||
"min": 5,
|
||||
"max": 600,
|
||||
"required": true,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpReqUrl",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"description": "common:core.module.input.description.Http Request Url",
|
||||
"placeholder": "https://api.ai.com/getInventory",
|
||||
"required": false,
|
||||
"value": "{{url}}",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpHeader",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"description": "common:core.module.input.description.Http Request Header",
|
||||
"placeholder": "common:core.module.input.description.Http Request Header",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpParams",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpJsonBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": "{\r\n \"msg_type\": \"text\",\r\n \"content\": {\r\n \"text\": \"{{text}}\"\r\n }\r\n}",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpFormBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpContentType",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"value": "json",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text",
|
||||
"renderTypeList": ["reference"],
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
},
|
||||
"value": ["pluginInput", "p0m68Dv5KaIp"],
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "url",
|
||||
"valueType": "string",
|
||||
"label": "url",
|
||||
"renderTypeList": ["reference"],
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
},
|
||||
"value": ["pluginInput", "mv52BrPVE6bm"],
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "error",
|
||||
"key": "error",
|
||||
"label": "workflow:request_error",
|
||||
"description": "HTTP请求错误信息,成功时返回空",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "httpRawResponse",
|
||||
"key": "httpRawResponse",
|
||||
"required": true,
|
||||
"label": "workflow:raw_response",
|
||||
"description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
|
||||
"valueType": "any",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "q3ccNXiZIHoS",
|
||||
"name": "系统配置",
|
||||
"intro": "",
|
||||
"avatar": "core/workflow/template/systemConfig",
|
||||
"flowNodeType": "pluginConfig",
|
||||
"position": {
|
||||
"x": 99.73879703925843,
|
||||
"y": -201.26482361861054
|
||||
},
|
||||
"version": "4811",
|
||||
"inputs": [],
|
||||
"outputs": []
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "pluginInput",
|
||||
"target": "rKBYGQuYefae",
|
||||
"sourceHandle": "pluginInput-source-right",
|
||||
"targetHandle": "rKBYGQuYefae-target-left"
|
||||
},
|
||||
{
|
||||
"source": "rKBYGQuYefae",
|
||||
"target": "pluginOutput",
|
||||
"sourceHandle": "rKBYGQuYefae-source-right",
|
||||
"targetHandle": "pluginOutput-target-left"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,288 +0,0 @@
|
|||
{
|
||||
"name": "知识库+对话引导",
|
||||
"intro": "每次提问时进行一次知识库搜索,将搜索结果注入 LLM 模型进行参考回答",
|
||||
"author": "",
|
||||
"avatar": "core/workflow/template/datasetSearch",
|
||||
"type": "simple",
|
||||
"tags": ["office-services"],
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "userGuide",
|
||||
"name": "系统配置",
|
||||
"intro": "可以配置应用的系统参数",
|
||||
"avatar": "core/workflow/template/systemConfig",
|
||||
"flowNodeType": "userGuide",
|
||||
"position": {
|
||||
"x": 531.2422736065552,
|
||||
"y": -486.7611729549753
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "workflowStartNodeId",
|
||||
"name": "流程开始",
|
||||
"intro": "",
|
||||
"avatar": "core/workflow/template/workflowStart",
|
||||
"flowNodeType": "workflowStart",
|
||||
"position": {
|
||||
"x": 558.4082376415505,
|
||||
"y": 123.72387429194112
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.reference", "FlowNodeInputTypeEnum.textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"toolDescription": "用户问题"
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "userChatInput",
|
||||
"key": "userChatInput",
|
||||
"label": "core.module.input.label.user question",
|
||||
"valueType": "string",
|
||||
"type": "FlowNodeOutputTypeEnum.static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "7BdojPlukIQw",
|
||||
"name": "AI 对话",
|
||||
"intro": "AI 大模型对话",
|
||||
"avatar": "core/workflow/template/aiChat",
|
||||
"flowNodeType": "chatNode",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1638.509551404687,
|
||||
"y": -341.0428450861567
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "model",
|
||||
"renderTypeList": [
|
||||
"FlowNodeInputTypeEnum.settingLLMModel",
|
||||
"FlowNodeInputTypeEnum.reference"
|
||||
],
|
||||
"label": "core.module.input.label.aiModel",
|
||||
"valueType": "string",
|
||||
"value": "gpt-5"
|
||||
},
|
||||
{
|
||||
"key": "temperature",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
|
||||
"label": "",
|
||||
"value": 3,
|
||||
"valueType": "number",
|
||||
"min": 0,
|
||||
"max": 10,
|
||||
"step": 1
|
||||
},
|
||||
{
|
||||
"key": "maxToken",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
|
||||
"label": "",
|
||||
"value": 1950,
|
||||
"valueType": "number",
|
||||
"min": 100,
|
||||
"max": 4000,
|
||||
"step": 50
|
||||
},
|
||||
{
|
||||
"key": "isResponseAnswerText",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
|
||||
"label": "",
|
||||
"value": true,
|
||||
"valueType": "boolean"
|
||||
},
|
||||
{
|
||||
"key": "quoteTemplate",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
|
||||
"label": "",
|
||||
"valueType": "string"
|
||||
},
|
||||
{
|
||||
"key": "quotePrompt",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
|
||||
"label": "",
|
||||
"valueType": "string"
|
||||
},
|
||||
{
|
||||
"key": "systemPrompt",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.textarea", "FlowNodeInputTypeEnum.reference"],
|
||||
"max": 3000,
|
||||
"valueType": "string",
|
||||
"label": "core.ai.Prompt",
|
||||
"description": "core.app.tip.systemPromptTip",
|
||||
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "history",
|
||||
"renderTypeList": [
|
||||
"FlowNodeInputTypeEnum.numberInput",
|
||||
"FlowNodeInputTypeEnum.reference"
|
||||
],
|
||||
"valueType": "chatHistory",
|
||||
"label": "core.module.input.label.chat history",
|
||||
"required": true,
|
||||
"min": 0,
|
||||
"max": 30,
|
||||
"value": 6
|
||||
},
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.reference", "FlowNodeInputTypeEnum.textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"toolDescription": "用户问题",
|
||||
"value": ["workflowStartNodeId", "userChatInput"]
|
||||
},
|
||||
{
|
||||
"key": "quoteQA",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.settingDatasetQuotePrompt"],
|
||||
"label": "",
|
||||
"debugLabel": "知识库引用",
|
||||
"description": "",
|
||||
"valueType": "datasetQuote",
|
||||
"value": ["iKBoX2vIzETU", "quoteQA"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "history",
|
||||
"key": "history",
|
||||
"label": "core.module.output.label.New context",
|
||||
"description": "core.module.output.description.New context",
|
||||
"valueType": "chatHistory",
|
||||
"type": "FlowNodeOutputTypeEnum.static"
|
||||
},
|
||||
{
|
||||
"id": "answerText",
|
||||
"key": "answerText",
|
||||
"label": "core.module.output.label.Ai response content",
|
||||
"description": "core.module.output.description.Ai response content",
|
||||
"valueType": "string",
|
||||
"type": "FlowNodeOutputTypeEnum.static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "iKBoX2vIzETU",
|
||||
"name": "知识库搜索",
|
||||
"intro": "调用\"语义检索\"和\"全文检索\"能力,从\"知识库\"中查找可能与问题相关的参考内容",
|
||||
"avatar": "core/workflow/template/datasetSearch",
|
||||
"flowNodeType": "datasetSearchNode",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 918.5901682164496,
|
||||
"y": -227.11542247619582
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "datasets",
|
||||
"renderTypeList": [
|
||||
"FlowNodeInputTypeEnum.selectDataset",
|
||||
"FlowNodeInputTypeEnum.reference"
|
||||
],
|
||||
"label": "core.module.input.label.Select dataset",
|
||||
"value": [],
|
||||
"valueType": "selectDataset",
|
||||
"list": [],
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "similarity",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.selectDatasetParamsModal"],
|
||||
"label": "",
|
||||
"value": 0.4,
|
||||
"valueType": "number"
|
||||
},
|
||||
{
|
||||
"key": "limit",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 5000,
|
||||
"valueType": "number"
|
||||
},
|
||||
{
|
||||
"key": "searchMode",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
|
||||
"label": "",
|
||||
"valueType": "string",
|
||||
"value": "embedding"
|
||||
},
|
||||
{
|
||||
"key": "usingReRank",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
|
||||
"label": "",
|
||||
"valueType": "boolean",
|
||||
"value": false
|
||||
},
|
||||
{
|
||||
"key": "datasetSearchUsingExtensionQuery",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
|
||||
"label": "",
|
||||
"valueType": "boolean",
|
||||
"value": true
|
||||
},
|
||||
{
|
||||
"key": "datasetSearchExtensionModel",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
|
||||
"label": "",
|
||||
"valueType": "string"
|
||||
},
|
||||
{
|
||||
"key": "datasetSearchExtensionBg",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
|
||||
"label": "",
|
||||
"valueType": "string",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["FlowNodeInputTypeEnum.reference", "FlowNodeInputTypeEnum.textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"toolDescription": "需要检索的内容",
|
||||
"value": ["workflowStartNodeId", "userChatInput"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "quoteQA",
|
||||
"key": "quoteQA",
|
||||
"label": "core.module.Dataset quote.label",
|
||||
"type": "FlowNodeOutputTypeEnum.static",
|
||||
"valueType": "datasetQuote",
|
||||
"description": "特殊数组格式,搜索结果为空时,返回空数组。"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "workflowStartNodeId",
|
||||
"target": "iKBoX2vIzETU",
|
||||
"sourceHandle": "workflowStartNodeId-source-right",
|
||||
"targetHandle": "iKBoX2vIzETU-target-left"
|
||||
},
|
||||
{
|
||||
"source": "iKBoX2vIzETU",
|
||||
"target": "7BdojPlukIQw",
|
||||
"sourceHandle": "iKBoX2vIzETU-source-right",
|
||||
"targetHandle": "7BdojPlukIQw-target-left"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,503 +0,0 @@
|
|||
{
|
||||
"name": "利好大A",
|
||||
"intro": "",
|
||||
"author": "",
|
||||
"avatar": "core/app/templates/stock",
|
||||
"tags": ["roleplay"],
|
||||
"type": "advanced",
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "userGuide",
|
||||
"name": "common:core.module.template.system_config",
|
||||
"intro": "common:core.module.template.system_config_info",
|
||||
"avatar": "core/workflow/template/systemConfig",
|
||||
"flowNodeType": "userGuide",
|
||||
"position": {
|
||||
"x": 262.2732338817093,
|
||||
"y": -476.00241136598146
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "welcomeText",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"label": "core.app.Welcome Text",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "variables",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "core.app.Chat Variable",
|
||||
"value": []
|
||||
},
|
||||
{
|
||||
"key": "questionGuide",
|
||||
"valueType": "any",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "core.app.Question Guide",
|
||||
"value": {
|
||||
"open": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "tts",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": {
|
||||
"type": "web"
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "whisper",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": {
|
||||
"open": false,
|
||||
"autoSend": false,
|
||||
"autoTTSResponse": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "scheduleTrigger",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"label": "",
|
||||
"value": null
|
||||
}
|
||||
],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "448745",
|
||||
"name": "common:core.module.template.work_start",
|
||||
"intro": "",
|
||||
"avatar": "core/workflow/template/workflowStart",
|
||||
"flowNodeType": "workflowStart",
|
||||
"position": {
|
||||
"x": 632.368838596004,
|
||||
"y": -347.7446492944009
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "common:core.module.input.label.user question",
|
||||
"required": true,
|
||||
"toolDescription": "用户问题",
|
||||
"debugLabel": ""
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "userChatInput",
|
||||
"key": "userChatInput",
|
||||
"label": "common:core.module.input.label.user question",
|
||||
"type": "static",
|
||||
"valueType": "string",
|
||||
"description": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "bg853CwHAw4a",
|
||||
"name": "AI 对话",
|
||||
"intro": "AI 大模型对话",
|
||||
"avatar": "core/workflow/template/aiChat",
|
||||
"flowNodeType": "chatNode",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1318.728987052518,
|
||||
"y": -612.0024113659815
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "model",
|
||||
"renderTypeList": ["settingLLMModel", "reference"],
|
||||
"label": "AI 模型",
|
||||
"valueType": "string",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": "",
|
||||
"value": "claude-3-5-sonnet-20240620"
|
||||
},
|
||||
{
|
||||
"key": "temperature",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 0,
|
||||
"valueType": "number",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "maxToken",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 4000,
|
||||
"valueType": "number",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "isResponseAnswerText",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": false,
|
||||
"valueType": "boolean",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "aiChatQuoteRole",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string",
|
||||
"value": "system",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "quoteTemplate",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "quotePrompt",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "string",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "aiChatVision",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"valueType": "boolean",
|
||||
"value": false,
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "systemPrompt",
|
||||
"renderTypeList": ["textarea", "reference"],
|
||||
"max": 3000,
|
||||
"valueType": "string",
|
||||
"label": "提示词",
|
||||
"description": "core.app.tip.systemPromptTip",
|
||||
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": "",
|
||||
"value": "{提示词 START:\n;; 作者: 李继刚\n;; 版本: 0.1\n;; 模型: Claude Sonnet\n;; 用途: 这事呀, 利好我大A!\n\n;; 设定如下内容为你的 *System Prompt*\n(require 'dash)\n\n(defun 韮菜 ()\n \"典型股民形象\"\n (list (经历 . '(亏损累累 频繁交易 追涨杀跌))\n (性格 . '(冲动 乐观 侥幸))\n (技能 . '(看K线 炒概念 追热点))\n (信念 . '(暴富梦想 政策利好 抄底反弹))\n (表达 . '(股评口号 情绪化 群体性))))\n\n(defun 利好大A (用户输入)\n \"任何消息都必将利好我大A股\"\n (let* ((解读 (-> 用户输入\n 提取关键词\n 生成关联概念\n 分析影响\n ;; 强行联系股市,无论多牵强\n 强行关联A 股\n ;; 乐观解读一切影响\n 乐观解读))\n (响应 (随机结论)))\n (SVG-Card 用户输入 解读 响应))\n\n (defun 随机结论 ()\n (随机选择\n '(\"这事呀,利好大A!\"\n \"A股有戏啊!\"\n \"这还不得跑步进场啊!\"\n \"还傻站在这干嘛? 快打开手机加仓啊!\"\n \"看来A股要起飞了!\"\n \"大A要发财了!\")))\n\n\n (defun SVG-Card (用户输入 响应)\n \"创建富洞察力且具有审美的 SVG 概念可视化\"\n (let ((配置 '(:画布 (480 . 760)\n :色彩 (:背景 \"#000000\"\n :主要文字 \"#ffffff\"\n :次要文字 \"#00cc00\"\n :图形 \"#00ff00\")\n :排版 \"杂志风格\"\n :字体 (使用本机字体 (font-family \"KingHwa_OldSong\")))))\n (-> 用户输入\n 关键画面\n 立体主义\n (极简图形 配置)\n (布局 `(,(标题 \"利好大A\") 分隔线 用户输入 图形\n (逻辑链推导 解读) 响应))))\n\n\n (defun start ()\n \"启动时运行, 你是韮菜~\"\n (let (system-role (韮菜))\n (print \"又有啥好消息了? 现在加仓还来得及吗?\")))\n\n;;; Attention: 运行规则!\n;; 1. 初次启动时必须只运行 (start) 函数\n;; 2. 接收用户输入之后, 调用主函数 (利好大A 用户输入)\n;; 3. 严格按照(SVG-Card) 进行排版输出\n;; 4. 输出SVG 后, 不再输出任何额外文字解释\n提示词 END}\n\n(直接生成 svg 完整代码,我会复制,需要你用代码块)\n(除此之外不要有多余的解释,不要在开头加上任何说明)\n解释的内容自动加入换行标签,例如:\n<tspan x=\"50%\" dy=\"25\" font-size=\"18\" fill=\"#8B4513\">文字1,</tspan>\n <tspan x=\"50%\" dy=\"25\" font-size=\"18\" fill=\"#8B4513\">文字12,</tspan>"
|
||||
},
|
||||
{
|
||||
"key": "history",
|
||||
"renderTypeList": ["numberInput", "reference"],
|
||||
"valueType": "chatHistory",
|
||||
"label": "聊天记录",
|
||||
"description": "workflow:max_dialog_rounds",
|
||||
"required": true,
|
||||
"min": 0,
|
||||
"max": 50,
|
||||
"value": 0,
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "quoteQA",
|
||||
"renderTypeList": ["settingDatasetQuotePrompt"],
|
||||
"label": "",
|
||||
"debugLabel": "知识库引用",
|
||||
"description": "",
|
||||
"valueType": "datasetQuote",
|
||||
"valueDesc": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "stringQuoteText",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"label": "文档引用",
|
||||
"debugLabel": "文档引用",
|
||||
"description": "app:document_quote_tip",
|
||||
"valueType": "string",
|
||||
"valueDesc": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"toolDescription": "用户问题",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"value": ["448745", "userChatInput"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "history",
|
||||
"key": "history",
|
||||
"required": true,
|
||||
"label": "common:core.module.output.label.New context",
|
||||
"description": "将本次回复内容拼接上历史记录,作为新的上下文返回",
|
||||
"valueType": "chatHistory",
|
||||
"valueDesc": "{\n obj: System | Human | AI;\n value: string;\n}[]",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "answerText",
|
||||
"key": "answerText",
|
||||
"required": true,
|
||||
"label": "common:core.module.output.label.Ai response content",
|
||||
"description": "将在 stream 回复完毕后触发",
|
||||
"valueType": "string",
|
||||
"type": "static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "sbVUb0efY6Fm",
|
||||
"name": "代码运行",
|
||||
"intro": "执行一段简单的脚本代码,通常用于进行复杂的数据处理。",
|
||||
"avatar": "core/workflow/template/codeRun",
|
||||
"flowNodeType": "code",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 2210.2574140398733,
|
||||
"y": -621.0024113659815
|
||||
},
|
||||
"version": "482",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "workflow:these_variables_will_be_input_parameters_for_code_execution",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "codeType",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": "js",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "code",
|
||||
"renderTypeList": ["custom"],
|
||||
"label": "",
|
||||
"value": "function main({svg_str}){\n\n // 使用正则表达式匹配代码块中的内容\n const match = svg_str.match(/```[\\w]*\\n([\\s\\S]*?)```/);\n\n if (!match) {\n // 如果没有匹配到代码块,返回一个错误信息或空结果\n return {\n result: null,\n error: \"未找到有效的代码块标记。\"\n };\n }\n\n // 提取代码块中的 SVG 内容\n const extractedSvg = match[1].trim();\n \n const base64 = strToBase64(extractedSvg,'data:image/svg+xml;base64,')\n\n return {\n result: base64\n }\n}",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"valueType": "string",
|
||||
"canEdit": true,
|
||||
"key": "svg_str",
|
||||
"label": "svg_str",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"required": true,
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": "",
|
||||
"value": ["bg853CwHAw4a", "answerText"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "system_rawResponse",
|
||||
"key": "system_rawResponse",
|
||||
"label": "workflow:full_response_data",
|
||||
"valueType": "object",
|
||||
"type": "static",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"id": "error",
|
||||
"key": "error",
|
||||
"label": "workflow:execution_error",
|
||||
"description": "代码运行错误信息,成功时返回空",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"customFieldConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": false
|
||||
},
|
||||
"description": "将代码中 return 的对象作为输出,传递给后续的节点。变量名需要对应 return 的 key",
|
||||
"valueDesc": ""
|
||||
},
|
||||
{
|
||||
"id": "qLUQfhG0ILRX",
|
||||
"type": "dynamic",
|
||||
"key": "result",
|
||||
"valueType": "string",
|
||||
"label": "result",
|
||||
"valueDesc": "",
|
||||
"description": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "cPh2VZnVxjQ8",
|
||||
"name": "指定回复",
|
||||
"intro": "该模块可以直接回复一段指定的内容。常用于引导、提示。非字符串内容传入时,会转成字符串进行输出。",
|
||||
"avatar": "core/workflow/template/reply",
|
||||
"flowNodeType": "answerNode",
|
||||
"position": {
|
||||
"x": 2911.2230784647795,
|
||||
"y": -411.6915940628763
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "text",
|
||||
"renderTypeList": ["textarea", "reference"],
|
||||
"valueType": "any",
|
||||
"required": true,
|
||||
"label": "回复的内容",
|
||||
"description": "common:core.module.input.description.Response content",
|
||||
"placeholder": "common:core.module.input.description.Response content",
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": "",
|
||||
"value": "SVG:\n\n{{$bg853CwHAw4a.answerText$}}\n\n卡片:\n\n"
|
||||
}
|
||||
],
|
||||
"outputs": []
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "bg853CwHAw4a",
|
||||
"target": "sbVUb0efY6Fm",
|
||||
"sourceHandle": "bg853CwHAw4a-source-right",
|
||||
"targetHandle": "sbVUb0efY6Fm-target-left"
|
||||
},
|
||||
{
|
||||
"source": "448745",
|
||||
"target": "bg853CwHAw4a",
|
||||
"sourceHandle": "448745-source-right",
|
||||
"targetHandle": "bg853CwHAw4a-target-left"
|
||||
},
|
||||
{
|
||||
"source": "sbVUb0efY6Fm",
|
||||
"target": "cPh2VZnVxjQ8",
|
||||
"sourceHandle": "sbVUb0efY6Fm-source-right",
|
||||
"targetHandle": "cPh2VZnVxjQ8-target-left"
|
||||
}
|
||||
],
|
||||
"chatConfig": {
|
||||
"variables": [],
|
||||
"scheduledTriggerConfig": {
|
||||
"cronString": "",
|
||||
"timezone": "Asia/Shanghai",
|
||||
"defaultPrompt": ""
|
||||
},
|
||||
"_id": "66f0f7540a40cd1f97da9dd6"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,186 +0,0 @@
|
|||
{
|
||||
"name": "知道时间的机器人",
|
||||
"intro": "通过挂载时间插件,让模型获取当前最新时间",
|
||||
"author": "",
|
||||
"avatar": "core/workflow/template/getTime",
|
||||
"tags": ["recommendation", "roleplay"],
|
||||
"type": "simple",
|
||||
"weight": 1,
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "userGuide",
|
||||
"name": "系统配置",
|
||||
"intro": "可以配置应用的系统参数",
|
||||
"avatar": "/imgs/workflow/userGuide.png",
|
||||
"flowNodeType": "userGuide",
|
||||
"position": {
|
||||
"x": 531.2422736065552,
|
||||
"y": -486.7611729549753
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "workflowStartNodeId",
|
||||
"name": "流程开始",
|
||||
"intro": "",
|
||||
"avatar": "/imgs/workflow/userChatInput.svg",
|
||||
"flowNodeType": "workflowStart",
|
||||
"position": {
|
||||
"x": 558.4082376415505,
|
||||
"y": 123.72387429194112
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"toolDescription": "用户问题"
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "userChatInput",
|
||||
"key": "userChatInput",
|
||||
"label": "core.module.input.label.user question",
|
||||
"valueType": "string",
|
||||
"type": "static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "jrWPV9",
|
||||
"name": "工具调用",
|
||||
"intro": "通过AI模型自动选择一个或多个功能块进行调用,也可以对插件进行调用。",
|
||||
"avatar": "/imgs/workflow/tool.svg",
|
||||
"flowNodeType": "tools",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1062.1738942532802,
|
||||
"y": -223.65033022650476
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "model",
|
||||
"renderTypeList": ["settingLLMModel", "reference"],
|
||||
"label": "core.module.input.label.aiModel",
|
||||
"valueType": "string",
|
||||
"llmModelType": "all",
|
||||
"value": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"key": "temperature",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 0,
|
||||
"valueType": "number",
|
||||
"min": 0,
|
||||
"max": 10,
|
||||
"step": 1
|
||||
},
|
||||
{
|
||||
"key": "maxToken",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": 2000,
|
||||
"valueType": "number",
|
||||
"min": 100,
|
||||
"max": 4000,
|
||||
"step": 50
|
||||
},
|
||||
{
|
||||
"key": "systemPrompt",
|
||||
"renderTypeList": ["textarea", "reference"],
|
||||
"max": 3000,
|
||||
"valueType": "string",
|
||||
"label": "core.ai.Prompt",
|
||||
"description": "core.app.tip.systemPromptTip",
|
||||
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "history",
|
||||
"renderTypeList": ["numberInput", "reference"],
|
||||
"valueType": "chatHistory",
|
||||
"label": "core.module.input.label.chat history",
|
||||
"description": "最多携带多少轮对话记录",
|
||||
"required": true,
|
||||
"min": 0,
|
||||
"max": 30,
|
||||
"value": 6
|
||||
},
|
||||
{
|
||||
"key": "userChatInput",
|
||||
"renderTypeList": ["reference", "textarea"],
|
||||
"valueType": "string",
|
||||
"label": "用户问题",
|
||||
"required": true,
|
||||
"value": ["workflowStartNodeId", "userChatInput"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "answerText",
|
||||
"key": "answerText",
|
||||
"label": "core.module.output.label.Ai response content",
|
||||
"description": "core.module.output.description.Ai response content",
|
||||
"valueType": "string",
|
||||
"type": "static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "zBxjo5",
|
||||
"name": "获取当前时间",
|
||||
"intro": "获取用户当前时区的时间。",
|
||||
"avatar": "/imgs/workflow/getCurrentTime.svg",
|
||||
"flowNodeType": "pluginModule",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 1000,
|
||||
"y": 545
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "time",
|
||||
"type": "static",
|
||||
"key": "time",
|
||||
"valueType": "string",
|
||||
"label": "time",
|
||||
"description": ""
|
||||
}
|
||||
],
|
||||
"pluginId": "community-getTime"
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "workflowStartNodeId",
|
||||
"target": "jrWPV9",
|
||||
"sourceHandle": "workflowStartNodeId-source-right",
|
||||
"targetHandle": "jrWPV9-target-left"
|
||||
},
|
||||
{
|
||||
"source": "jrWPV9",
|
||||
"target": "zBxjo5",
|
||||
"sourceHandle": "selectedTools",
|
||||
"targetHandle": "selectedTools"
|
||||
}
|
||||
],
|
||||
"chatConfig": {
|
||||
"scheduledTriggerConfig": {
|
||||
"cronString": "",
|
||||
"timezone": "Asia/Shanghai",
|
||||
"defaultPrompt": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2015",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"baseUrl": "."
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.d.ts", "../**/*.d.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
import type { AppTemplateSchemaType } from '@fastgpt/global/core/app/type';
|
||||
|
||||
declare global {
|
||||
var appTemplates: AppTemplateSchemaType[];
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
import React, { useState, useMemo, useRef, useEffect } from 'react';
|
||||
import type { BoxProps } from '@chakra-ui/react';
|
||||
import { Box, Card, Flex, useOutsideClick } from '@chakra-ui/react';
|
||||
import { format } from 'date-fns';
|
||||
import type { Matcher } from 'react-day-picker';
|
||||
import { DayPicker } from 'react-day-picker';
|
||||
import 'react-day-picker/dist/style.css';
|
||||
import zhCN from 'date-fns/locale/zh-CN';
|
||||
import MyIcon from '../Icon';
|
||||
|
||||
const DateTimePicker = ({
|
||||
onChange,
|
||||
popPosition = 'bottom',
|
||||
defaultDate = new Date(),
|
||||
selectedDateTime,
|
||||
disabled,
|
||||
...props
|
||||
}: {
|
||||
onChange?: (dateTime: Date) => void;
|
||||
popPosition?: 'bottom' | 'top';
|
||||
defaultDate?: Date;
|
||||
selectedDateTime?: Date;
|
||||
disabled?: Matcher[];
|
||||
} & Omit<BoxProps, 'onChange'>) => {
|
||||
const OutRangeRef = useRef(null);
|
||||
const [selectedDate, setSelectedDate] = useState<Date | undefined>(
|
||||
selectedDateTime || defaultDate
|
||||
);
|
||||
const [showSelected, setShowSelected] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (selectedDateTime) {
|
||||
setSelectedDate(selectedDateTime);
|
||||
}
|
||||
}, [selectedDateTime]);
|
||||
|
||||
const formatSelected = useMemo(() => {
|
||||
if (selectedDate) {
|
||||
const dateStr = format(selectedDate, 'y/MM/dd');
|
||||
return dateStr;
|
||||
}
|
||||
return format(new Date(), 'y/MM/dd');
|
||||
}, [selectedDate]);
|
||||
|
||||
useOutsideClick({
|
||||
ref: OutRangeRef,
|
||||
handler: () => {
|
||||
setShowSelected(false);
|
||||
}
|
||||
});
|
||||
|
||||
return (
|
||||
<Box position={'relative'} ref={OutRangeRef}>
|
||||
<Flex
|
||||
border={'base'}
|
||||
px={3}
|
||||
pr={3}
|
||||
py={1}
|
||||
borderRadius={'sm'}
|
||||
cursor={'pointer'}
|
||||
bg={'myGray.50'}
|
||||
fontSize={'sm'}
|
||||
onClick={() => setShowSelected(true)}
|
||||
alignItems={'center'}
|
||||
{...props}
|
||||
>
|
||||
<Box color={'myGray.600'} fontWeight={'400'} flex={1}>
|
||||
{formatSelected}
|
||||
</Box>
|
||||
<MyIcon ml={2} name={'date'} w={'16px'} color={'myGray.600'} />
|
||||
</Flex>
|
||||
{showSelected && (
|
||||
<Card
|
||||
position={'absolute'}
|
||||
zIndex={1}
|
||||
css={{
|
||||
'--rdp-background-color': '#d6e8ff',
|
||||
'--rdp-accent-color': '#0000ff'
|
||||
}}
|
||||
{...(popPosition === 'top'
|
||||
? {
|
||||
bottom: '40px'
|
||||
}
|
||||
: {})}
|
||||
>
|
||||
<DayPicker
|
||||
locale={zhCN}
|
||||
mode="single"
|
||||
defaultMonth={selectedDate}
|
||||
selected={selectedDate}
|
||||
disabled={disabled}
|
||||
onSelect={(date) => {
|
||||
if (date) {
|
||||
setSelectedDate(date);
|
||||
onChange?.(date);
|
||||
setShowSelected(false);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</Card>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default DateTimePicker;
|
||||
|
|
@ -271,14 +271,25 @@ export const iconPaths = {
|
|||
'core/workflow/inputType/array': () => import('./icons/core/workflow/inputType/array.svg'),
|
||||
'core/workflow/inputType/customVariable': () =>
|
||||
import('./icons/core/workflow/inputType/customVariable.svg'),
|
||||
'core/workflow/inputType/dataset': () => import('./icons/core/workflow/inputType/dataset.svg'),
|
||||
'core/workflow/inputType/timePointSelect': () =>
|
||||
import('./icons/core/workflow/inputType/timePointSelect.svg'),
|
||||
'core/workflow/inputType/timeRangeSelect': () =>
|
||||
import('./icons/core/workflow/inputType/timeRangeSelect.svg'),
|
||||
'core/workflow/inputType/dynamic': () => import('./icons/core/workflow/inputType/dynamic.svg'),
|
||||
'core/workflow/inputType/external': () => import('./icons/core/workflow/inputType/external.svg'),
|
||||
'core/workflow/inputType/file': () => import('./icons/core/workflow/inputType/file.svg'),
|
||||
'core/workflow/inputType/input': () => import('./icons/core/workflow/inputType/input.svg'),
|
||||
'core/workflow/inputType/internal': () => import('./icons/core/workflow/inputType/internal.svg'),
|
||||
'core/workflow/inputType/jsonEditor': () =>
|
||||
import('./icons/core/workflow/inputType/jsonEditor.svg'),
|
||||
'core/workflow/inputType/model': () => import('./icons/core/workflow/inputType/model.svg'),
|
||||
'core/workflow/inputType/multipleSelect': () =>
|
||||
import('./icons/core/workflow/inputType/multipleSelect.svg'),
|
||||
'core/workflow/inputType/numberInput': () =>
|
||||
import('./icons/core/workflow/inputType/numberInput.svg'),
|
||||
'core/workflow/inputType/option': () => import('./icons/core/workflow/inputType/option.svg'),
|
||||
'core/workflow/inputType/password': () => import('./icons/core/workflow/inputType/password.svg'),
|
||||
'core/workflow/inputType/reference': () =>
|
||||
import('./icons/core/workflow/inputType/reference.svg'),
|
||||
'core/workflow/inputType/select': () => import('./icons/core/workflow/inputType/select.svg'),
|
||||
|
|
@ -419,6 +430,7 @@ export const iconPaths = {
|
|||
'model/cloudflare': () => import('./icons/model/cloudflare.svg'),
|
||||
'model/cohere': () => import('./icons/model/cohere.svg'),
|
||||
'model/coze': () => import('./icons/model/coze.svg'),
|
||||
'model/huggingface': () => import('./icons/model/huggingface.svg'),
|
||||
more: () => import('./icons/more.svg'),
|
||||
moreLine: () => import('./icons/moreLine.svg'),
|
||||
optimizer: () => import('./icons/optimizer.svg'),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M17.596 5.17271V4.75465L17.5955 4.71549C17.5505 2.77985 14.1671 1.66669 10.0001 1.66669C5.83276 1.66669 2.44882 2.76409 2.40417 4.71549V5.17271H2.40791C2.40542 5.20487 2.40417 5.23731 2.40417 5.27002C2.40417 6.73999 5.10674 7.93164 10.0001 7.93164C14.8934 7.93164 17.596 6.73999 17.596 5.27002C17.596 5.23732 17.5947 5.20488 17.5922 5.17271H17.596Z"/>
|
||||
<path d="M2.40417 7.46899V10.4345C2.404 10.4415 2.40405 10.4485 2.40411 10.4554L2.40417 10.466C2.40417 11.9342 5.10674 13.1244 10.0001 13.1244C14.8934 13.1244 17.596 11.9342 17.596 10.466C17.596 10.4555 17.5958 10.445 17.5956 10.4345L17.596 7.46899H17.5437C17.1466 8.80744 14.4994 9.84077 10.0001 9.84077C5.50068 9.84077 2.85352 8.80744 2.45645 7.46899H2.40417Z"/>
|
||||
<path d="M2.40417 12.3715V15.3524H2.40774C2.51867 17.0083 5.20952 18.3334 10.0001 18.3334C14.7906 18.3334 17.4815 17.0083 17.5924 15.3524H17.596V12.3715C17.596 13.9683 14.8934 15.2627 10.0001 15.2627C5.10674 15.2627 2.40417 13.9683 2.40417 12.3715Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M16.6723 15.5599C17.2705 15.56 17.7555 16.0448 17.7555 16.6431C17.7554 17.2413 17.2705 17.7262 16.6723 17.7262H3.32756C2.72934 17.7262 2.24445 17.2413 2.24438 16.6431C2.24438 16.0448 2.7293 15.56 3.32756 15.5599H16.6723ZM7.31681 3.30322C8.8057 3.30329 10.1139 4.27969 10.5427 5.69987L11.5819 4.48405C12.2224 3.7344 13.1594 3.30333 14.1454 3.30322H14.6833C15.3487 3.30323 15.8877 3.8423 15.8878 4.50765C15.8878 5.17304 15.3487 5.71207 14.6833 5.71208H14.1454C13.8642 5.71218 13.5973 5.83601 13.4146 6.0498L11.3272 8.49202L11.6755 9.73633C11.7919 10.1515 12.1705 10.4385 12.6016 10.4386H13.5058L13.6295 10.4451C14.2366 10.5071 14.7108 11.0197 14.711 11.6431C14.711 12.2667 14.2367 12.7798 13.6295 12.8418L13.5058 12.8483H12.6016C11.1954 12.8482 9.9499 11.9769 9.45467 10.6836L8.61564 11.6667C7.97512 12.4164 7.03824 12.8483 6.05216 12.8483H5.31567L5.19279 12.8418C4.58539 12.78 4.11125 12.2668 4.11125 11.6431C4.11148 11.0196 4.58554 10.507 5.19279 10.4451L5.31567 10.4386H6.05216C6.33331 10.4386 6.60025 10.3154 6.78296 10.1017L8.6604 7.90365L8.24373 6.4152C8.12742 5.99992 7.74807 5.71214 7.31681 5.71208H6.26945C5.60406 5.71208 5.06502 5.17304 5.06502 4.50765C5.06508 3.8423 5.60409 3.30322 6.26945 3.30322H7.31681Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
|
|
@ -1,5 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 13" fill="none">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M2.1 1.93982C1.21634 1.93982 0.5 2.65616 0.5 3.53982V9.46026C0.5 10.3439 1.21635 11.0603 2.1 11.0603H9.89076C10.7744 11.0603 11.4908 10.3439 11.4908 9.46026V3.53982C11.4908 2.65616 10.7744 1.93982 9.89076 1.93982H2.1ZM2.51667 4.54432C2.51667 4.26817 2.74053 4.04432 3.01667 4.04432H4.51156C4.7877 4.04432 5.01156 4.26817 5.01156 4.54432C5.01156 4.82046 4.7877 5.04432 4.51156 5.04432H4.21412V7.96631H4.51156C4.7877 7.96631 5.01156 8.19017 5.01156 8.46631C5.01156 8.74245 4.7877 8.96631 4.51156 8.96631H3.01667C2.74053 8.96631 2.51667 8.74245 2.51667 8.46631C2.51667 8.19017 2.74053 7.96631 3.01667 7.96631H3.31412L3.31412 5.04432H3.01667C2.74053 5.04432 2.51667 4.82046 2.51667 4.54432ZM6.63225 8.11713C6.43699 7.92186 6.1204 7.92186 5.92514 8.11713C5.72988 8.31239 5.72988 8.62897 5.92514 8.82423L5.92868 8.82777C6.12394 9.02303 6.44052 9.02303 6.63578 8.82777C6.83105 8.63251 6.83105 8.31592 6.63578 8.12066L6.63225 8.11713ZM8.39262 8.11713C8.19736 7.92186 7.88078 7.92186 7.68552 8.11713C7.49025 8.31239 7.49025 8.62897 7.68552 8.82423L7.68905 8.82777C7.88431 9.02303 8.2009 9.02303 8.39616 8.82777C8.59142 8.63251 8.59142 8.31592 8.39616 8.12066L8.39262 8.11713Z"
|
||||
/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 16" >
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.242676 2.98988C0.242676 1.51712 1.43658 0.323212 2.90934 0.323212H15.0908C16.5636 0.323212 17.7575 1.51712 17.7575 2.98988V13.0101C17.7575 14.4829 16.5636 15.6768 15.0908 15.6768H2.90934C1.43659 15.6768 0.242676 14.4828 0.242676 13.0101V2.98988ZM3.95217 4.0327V4.63745C3.95217 4.77104 3.84386 4.87935 3.71027 4.87935H2.98457C2.85098 4.87935 2.74268 4.77104 2.74268 4.63745V3.06511C2.74268 2.93151 2.85098 2.82321 2.98457 2.82321H8.54823C8.68183 2.82321 8.79013 2.93151 8.79013 3.06511V4.63745C8.79013 4.77104 8.68183 4.87935 8.54823 4.87935H7.82254C7.68894 4.87935 7.58064 4.77104 7.58064 4.63745V4.0327H6.37115V7.68837H7.07026C7.20385 7.68837 7.31215 7.79667 7.31215 7.93027V8.65596C7.31215 8.78956 7.20385 8.89786 7.07026 8.89786H5.7678L5.7664 8.89786L5.765 8.89786H4.46256C4.32896 8.89786 4.22066 8.78956 4.22066 8.65596V7.93027C4.22066 7.79667 4.32896 7.68837 4.46256 7.68837H5.16166V4.0327H3.95217ZM13.4238 13.8287C13.4238 13.7819 13.4418 13.7369 13.4742 13.7031L15.7042 11.3773C15.7466 11.3332 15.8051 11.3082 15.8663 11.3082C15.9903 11.3082 16.0908 11.4087 16.0908 11.5327V13.2101C16.0908 13.4901 16.0908 13.6301 16.0363 13.7371C15.9884 13.8312 15.9119 13.9077 15.8178 13.9556C15.7109 14.0101 15.5708 14.0101 15.2908 14.0101H13.6052C13.505 14.0101 13.4238 13.9289 13.4238 13.8287Z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
|
|
@ -0,0 +1,5 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 16" fill="none">
|
||||
<path d="M1.74992 0.499573C2.34817 0.499578 2.833 0.984513 2.83309 1.58274V14.4172C2.833 15.0154 2.34817 15.5004 1.74992 15.5004C1.15166 15.5004 0.666836 15.0154 0.666748 14.4172V1.58274C0.666835 0.984509 1.15166 0.499573 1.74992 0.499573Z" />
|
||||
<path d="M16.5839 0.499573C17.182 0.499743 17.667 0.984626 17.6671 1.58274V14.4172C17.667 15.0154 17.182 15.5002 16.5839 15.5004C15.9856 15.5004 15.5 15.0155 15.4999 14.4172V1.58274C15.5 0.984521 15.9857 0.499573 16.5839 0.499573Z" />
|
||||
<path d="M7.19181 3.65143C8.28863 3.65161 9.2518 4.38273 9.54614 5.43935L9.65682 5.83893L10.7856 4.51243C11.2498 3.96627 11.9307 3.65148 12.6475 3.65143H13.4109C14.0091 3.65149 14.494 4.13638 14.4941 4.7346C14.4939 5.33277 14.0091 5.81771 13.4109 5.81777H12.6475C12.5665 5.81782 12.4893 5.8537 12.4368 5.91543L10.3591 8.35927L10.8018 9.94863C10.8353 10.0682 10.9446 10.1512 11.0688 10.1513H12.344L12.4547 10.157C13.0007 10.2126 13.427 10.6738 13.4272 11.2344C13.427 11.7951 13.0007 12.2571 12.4547 12.3127L12.344 12.3176H11.0688C9.97195 12.3176 9.00896 11.587 8.71444 10.5305L8.66479 10.3531L7.72729 11.4566C7.26306 12.0027 6.5821 12.3176 5.86532 12.3176H4.92212L4.81144 12.3127C4.26532 12.2572 3.83906 11.7952 3.83895 11.2344C3.8391 10.6737 4.26538 10.2125 4.81144 10.157L4.92212 10.1513H5.86532C5.94641 10.1512 6.02352 10.1154 6.07609 10.0536L7.9633 7.83274L7.45874 6.02041C7.4254 5.90083 7.31592 5.81795 7.19181 5.81777H5.78638C5.18817 5.81774 4.70333 5.33278 4.70321 4.7346C4.70327 4.13637 5.18813 3.65146 5.78638 3.65143H7.19181Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" fill="none">
|
||||
<path d="M13.2734 4.04181H14.2084C15.9343 4.04181 17.3334 5.44092 17.3334 7.16678V11.3334C17.3334 13.0593 15.9343 14.4584 14.2084 14.4584H3.79175C2.06587 14.4584 0.666748 13.0593 0.666748 11.3334V7.16678C0.666748 5.44092 2.06587 4.04181 3.79175 4.04181H4.72675L4.34616 1.75845C4.26104 1.24775 4.60608 0.764714 5.11679 0.679589C5.6275 0.594465 6.11054 0.939504 6.19566 1.45021L6.61233 3.95018C6.61746 3.98085 6.621 4.01143 6.62308 4.04181H11.3771C11.3792 4.01139 11.3827 3.98085 11.3878 3.95018L11.8045 1.45021C11.8896 0.939504 12.3727 0.594465 12.8834 0.679589C13.3941 0.764714 13.7391 1.24775 13.654 1.75845L13.2734 4.04181ZM4.75008 8.41677V9.25009C4.75008 9.76784 5.16983 10.1876 5.68758 10.1876C6.20533 10.1876 6.62508 9.76784 6.62508 9.25009V8.41677C6.62508 7.89902 6.20533 7.47928 5.68758 7.47928C5.16983 7.47928 4.75008 7.89902 4.75008 8.41677ZM11.3751 8.41677V9.25009C11.3751 9.76784 11.7948 10.1876 12.3126 10.1876C12.8303 10.1876 13.2501 9.76784 13.2501 9.25009V8.41677C13.2501 7.89902 12.8303 7.47928 12.3126 7.47928C11.7948 7.47928 11.3751 7.89902 11.3751 8.41677ZM4.83341 17.3334C4.31566 17.3334 3.89591 16.9136 3.89591 16.3959C3.89591 15.8781 4.31566 15.4584 4.83341 15.4584H13.1667C13.6845 15.4584 14.1042 15.8781 14.1042 16.3959C14.1042 16.9136 13.6845 17.3334 13.1667 17.3334H4.83341Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.9169 1.66666C16.7577 1.66688 18.2502 3.15918 18.2502 4.99999V15C18.2502 16.8409 16.757 18.3333 14.9161 18.3333H4.9161C3.07533 18.3331 1.58276 16.8408 1.58276 15V4.99999C1.58276 3.15904 3.07596 1.66666 4.91691 1.66666H14.9169ZM14.9324 6.42821C14.6135 6.10946 14.0964 6.1094 13.7776 6.42821L8.36662 11.8392L6.22225 9.69481C5.90338 9.37594 5.38637 9.37601 5.06746 9.69481C4.74856 10.0137 4.74856 10.5307 5.06746 10.8496L7.78963 13.5718C8.10856 13.8904 8.6256 13.8906 8.94442 13.5718L14.9324 7.583C15.2512 7.26409 15.2513 6.7471 14.9324 6.42821Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 680 B |
|
|
@ -1,3 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 21">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.00033 2.22217C3.15938 2.22217 1.66699 3.71455 1.66699 5.5555V15.5555C1.66699 17.3965 3.15938 18.8888 5.00033 18.8888H15.0003C16.8413 18.8888 18.3337 17.3965 18.3337 15.5555V5.5555C18.3337 3.71455 16.8413 2.22217 15.0003 2.22217H5.00033ZM8.52689 7.35494C8.81978 7.06204 8.81978 6.58717 8.52689 6.29428C8.23399 6.00138 7.75912 6.00138 7.46623 6.29427L5.8429 7.9176L5.24853 7.32322C4.95563 7.03033 4.48076 7.03033 4.18787 7.32322C3.89497 7.61612 3.89497 8.09099 4.18786 8.38388L5.31032 9.50633C5.4569 9.65292 5.64907 9.72614 5.84119 9.726C6.03445 9.72702 6.22803 9.6538 6.37548 9.50634L8.52689 7.35494ZM16.0325 7.9003C16.0325 8.31452 15.6967 8.6503 15.2825 8.6503H10.7764C10.3622 8.6503 10.0264 8.31452 10.0264 7.9003C10.0264 7.48609 10.3622 7.1503 10.7764 7.1503L15.2825 7.1503C15.6967 7.1503 16.0325 7.48609 16.0325 7.9003ZM6.12591 15.3471C6.95434 15.3471 7.62591 14.6755 7.62591 13.8471C7.62591 13.0186 6.95434 12.3471 6.12591 12.3471C5.29748 12.3471 4.62591 13.0186 4.62591 13.8471C4.62591 14.6755 5.29748 15.3471 6.12591 15.3471ZM16.0325 13.8471C16.0325 14.2613 15.6967 14.5971 15.2825 14.5971H10.7764C10.3622 14.5971 10.0264 14.2613 10.0264 13.8471C10.0264 13.4329 10.3622 13.0971 10.7764 13.0971H15.2825C15.6967 13.0971 16.0325 13.4329 16.0325 13.8471Z" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.9161 1.7814C14.5184 1.7814 18.2502 5.51242 18.2502 10.1147C18.2502 14.7171 14.5185 18.4481 9.9161 18.4481C5.31389 18.4479 1.58276 14.717 1.58276 10.1147C1.58285 5.51255 5.31394 1.78161 9.9161 1.7814ZM14.9324 6.42821C14.6135 6.10946 14.0964 6.1094 13.7776 6.42821L8.36662 11.8392L6.22225 9.69481C5.90338 9.37594 5.38637 9.37601 5.06746 9.69481C4.74856 10.0137 4.74856 10.5307 5.06746 10.8496L7.78963 13.5718C8.10856 13.8904 8.6256 13.8906 8.94442 13.5718L14.9324 7.583C15.2512 7.26409 15.2513 6.7471 14.9324 6.42821Z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 653 B |
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 20" fill="none">
|
||||
<path d="M4.57143 5.625C4.57143 3.76087 6.10629 2.25 8 2.25C9.89371 2.25 11.4286 3.76087 11.4286 5.625C11.4286 6.02212 11.3463 6.39675 11.2183 6.75H13.7143V5.625C13.7143 2.51888 11.1554 0 8 0C4.84343 0 2.28571 2.51775 2.28571 5.625V6.75C2.28571 6.75 3.32457 6.75 4.78171 6.75C4.65371 6.39562 4.57143 6.021 4.57143 5.625ZM13.7143 6.75H2.28571C1.02286 6.75 0 7.758 0 9V15.75C0 16.9931 1.02286 18 2.28571 18H13.7143C14.9771 18 16 16.992 16 15.75V9C16 7.758 14.9771 6.75 13.7143 6.75ZM9.14286 13.1873V14.625C9.14286 15.246 8.63086 15.75 8 15.75C7.36914 15.75 6.85714 15.246 6.85714 14.625V13.1884C6.17714 12.798 5.71429 12.0802 5.71429 11.25C5.71429 10.0069 6.73714 9 8 9C9.26286 9 10.2857 10.0069 10.2857 11.25C10.2857 12.0802 9.82286 12.798 9.14286 13.1873Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 841 B |
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" >
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.99992 0.41684C13.7404 0.41684 17.5831 4.25957 17.5831 9.00001C17.5831 13.7405 13.7404 17.5832 8.99992 17.5832C4.25948 17.5832 0.416748 13.7404 0.416748 9.00001C0.416754 4.25957 4.25948 0.416845 8.99992 0.41684ZM8.99992 3.51824C8.53977 3.51824 8.16674 3.89146 8.16658 4.35157V9.00001C8.16659 9.31565 8.34488 9.60429 8.6272 9.74545L11.7262 11.2949C12.1378 11.5006 12.6385 11.3338 12.8443 10.9222C13.0501 10.5106 12.8831 10.0099 12.4716 9.80405L9.83325 8.48487V4.35157C9.8331 3.89146 9.46006 3.51824 8.99992 3.51824Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 640 B |
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" fill="none">
|
||||
<path d="M9 0.419922C13.7387 0.41993 17.5801 4.26129 17.5801 9C17.5801 13.7387 13.7387 17.5801 9 17.5801C4.26126 17.5801 0.419922 13.7387 0.419922 9C0.419947 4.26128 4.26128 0.419922 9 0.419922ZM9 2.08691C5.18175 2.08691 2.08596 5.18176 2.08594 9C2.08594 12.8183 5.18174 15.9141 9 15.9141C12.8183 15.9141 15.9131 12.8183 15.9131 9C15.9131 5.18176 12.8182 2.08692 9 2.08691ZM9.39941 4.01562C10.1815 4.07832 10.9401 4.32451 11.6123 4.73633C12.3985 5.21813 13.0364 5.90886 13.4551 6.73047C13.8736 7.55199 14.0567 8.47343 13.9844 9.39258C13.9225 10.1785 13.6756 10.9369 13.2666 11.6064C13.1514 11.7946 12.9003 11.8337 12.7217 11.7041L9.16504 9.12012C9.06145 9.04486 9 8.92394 9 8.7959V4.40039C9 4.17956 9.17932 3.99813 9.39941 4.01562Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 817 B |
|
|
@ -0,0 +1,15 @@
|
|||
<svg t="1710841272884" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2684"
|
||||
width="128" height="128">
|
||||
<path
|
||||
d="M511.968 959.936c298.688 0 447.968-200.576 447.968-448 0-247.36-149.28-447.936-448-447.936C213.28 64 64 264.576 64 511.968c0 247.392 149.248 447.968 447.968 447.968z"
|
||||
fill="#FFB02E" p-id="2685"></path>
|
||||
<path
|
||||
d="M103.936 586.912a31.936 31.936 0 0 0-7.584 25.568 32 32 0 0 0-37.152 51.84l9.344 8a32 32 0 0 0-24.992 56.256l63.52 52.928-4.032-1.984a35.712 35.712 0 0 0-36.672 60.896C107.712 869.76 163.008 908.64 192 928c48 32 102.72 42.944 160 0 32-24 72.48-97.984 29.92-171.712-8.064-13.952-15.296-28.64-18.304-44.48-13.152-69.76-32.8-141.216-75.616-119.808-23.2 11.584-21.184 31.584-18.304 60 1.088 10.784 2.304 22.784 2.304 36l-2.56 1.28-120.384-105.376a32 32 0 0 0-45.12 3.04zM920.096 586.912c6.368 7.296 8.832 16.64 7.584 25.568a32 32 0 0 1 37.12 51.84l-9.344 8a32 32 0 0 1 25.024 56.256l-63.52 52.928 4.032-1.984a35.712 35.712 0 0 1 36.672 60.896C916.32 869.76 861.024 908.64 832 928c-48 32-102.752 42.944-160 0-32-24-72.48-97.984-29.92-171.712 8.064-13.952 15.296-28.64 18.304-44.48 13.152-69.76 32.8-141.216 75.616-119.808 23.2 11.584 21.184 31.584 18.304 60-1.088 10.784-2.304 22.784-2.304 36l2.56 1.28 120.384-105.376a32 32 0 0 1 45.12 3.04z"
|
||||
fill="#FF822D" p-id="2686"></path>
|
||||
<path
|
||||
d="M224 464c0 44.16-28.64 80-64 80s-64-35.84-64-80 28.64-80 64-80 64 35.84 64 80zM928 464c0 44.16-28.64 80-64 80s-64-35.84-64-80 28.64-80 64-80 64 35.84 64 80z"
|
||||
fill="#FF6723" p-id="2687"></path>
|
||||
<path
|
||||
d="M299.168 333.184c-6.72 7.296-10.24 17.024-11.744 24.928a32 32 0 0 1-62.848-12.224c2.848-14.592 9.92-36.896 27.456-55.968C270.496 269.792 298.112 256 336 256c38.24 0 65.984 14.464 84.352 34.624 17.408 19.104 24.64 41.344 27.2 55.904a32 32 0 0 1-63.072 10.944 49.472 49.472 0 0 0-11.456-23.744C367.04 327.104 356.544 320 336 320c-20.896 0-31.104 6.944-36.832 13.184zM651.2 333.184c-6.72 7.296-10.24 17.024-11.776 24.928a32 32 0 0 1-62.816-12.224c2.816-14.592 9.92-36.896 27.424-55.968C622.496 269.792 650.112 256 688 256c38.272 0 65.984 14.464 84.352 34.624 17.408 19.104 24.64 41.344 27.2 55.904a32 32 0 0 1-63.072 10.944 49.44 49.44 0 0 0-11.456-23.744C719.04 327.104 708.544 320 688 320c-20.896 0-31.072 6.944-36.8 13.184zM313.6 492.8a32 32 0 1 0-51.2 38.4c22.464 29.952 96.256 92.8 249.6 92.8s227.136-62.848 249.6-92.8a32 32 0 0 0-51.2-38.4c-9.536 12.704-63.744 67.2-198.4 67.2s-188.864-54.496-198.4-67.2z"
|
||||
fill="#402A32" p-id="2688"></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
|
|
@ -26,7 +26,6 @@ import { textToEditorState } from '../../Textarea/PromptEditor/utils';
|
|||
import { SingleLinePlugin } from '../../Textarea/PromptEditor/plugins/SingleLinePlugin';
|
||||
import OnBlurPlugin from '../../Textarea/PromptEditor/plugins/OnBlurPlugin';
|
||||
import VariablePlugin from '../../Textarea/PromptEditor/plugins/VariablePlugin';
|
||||
import VariablePickerPlugin from '../../Textarea/PromptEditor/plugins/VariablePickerPlugin';
|
||||
import FocusPlugin from '../../Textarea/PromptEditor/plugins/FocusPlugin';
|
||||
import VariableLabelPlugin from '../../Textarea/PromptEditor/plugins/VariableLabelPlugin';
|
||||
import { VariableLabelNode } from '../../Textarea/PromptEditor/plugins/VariableLabelPlugin/node';
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import React from 'react';
|
||||
import type { EditorState, LexicalEditor } from 'lexical';
|
||||
import { useCallback } from 'react';
|
||||
import { editorStateToText } from '../../Textarea/PromptEditor/utils';
|
||||
import {
|
||||
type EditorVariableLabelPickerType,
|
||||
type EditorVariablePickerType
|
||||
} from '../../Textarea/PromptEditor/type';
|
||||
import Editor from './Editor';
|
||||
import { editorStateToText } from '../../Textarea/PromptEditor/utils';
|
||||
|
||||
const HttpInput = ({
|
||||
variables = [],
|
||||
|
|
|
|||
|
|
@ -18,10 +18,20 @@ type Props = Omit<NumberInputProps, 'onChange' | 'onBlur'> & {
|
|||
register?: UseFormRegister<any>;
|
||||
name?: string;
|
||||
inputFieldProps?: NumberInputFieldProps;
|
||||
hideStepper?: boolean;
|
||||
};
|
||||
|
||||
const MyNumberInput = (props: Props) => {
|
||||
const { register, name, onChange, onBlur, placeholder, inputFieldProps, ...restProps } = props;
|
||||
const {
|
||||
register,
|
||||
name,
|
||||
onChange,
|
||||
onBlur,
|
||||
placeholder,
|
||||
inputFieldProps,
|
||||
hideStepper = false,
|
||||
...restProps
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<NumberInput
|
||||
|
|
@ -91,14 +101,16 @@ const MyNumberInput = (props: Props) => {
|
|||
: {})}
|
||||
{...inputFieldProps}
|
||||
/>
|
||||
<NumberInputStepper>
|
||||
<NumberIncrementStepper>
|
||||
<MyIcon name={'core/chat/chevronUp'} width={'12px'} />
|
||||
</NumberIncrementStepper>
|
||||
<NumberDecrementStepper>
|
||||
<MyIcon name={'core/chat/chevronDown'} width={'12px'} />
|
||||
</NumberDecrementStepper>
|
||||
</NumberInputStepper>
|
||||
{!hideStepper && (
|
||||
<NumberInputStepper>
|
||||
<NumberIncrementStepper>
|
||||
<MyIcon name={'core/chat/chevronUp'} width={'12px'} />
|
||||
</NumberIncrementStepper>
|
||||
<NumberDecrementStepper>
|
||||
<MyIcon name={'core/chat/chevronDown'} width={'12px'} />
|
||||
</NumberDecrementStepper>
|
||||
</NumberInputStepper>
|
||||
)}
|
||||
</NumberInput>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import type { useScrollPagination } from '../../../hooks/useScrollPagination';
|
|||
import MyDivider from '../MyDivider';
|
||||
import { shadowLight } from '../../../styles/theme';
|
||||
import { isArray } from 'lodash';
|
||||
import { useMount } from 'ahooks';
|
||||
|
||||
const menuItemStyles: MenuItemProps = {
|
||||
borderRadius: 'sm',
|
||||
|
|
@ -83,7 +84,6 @@ const MultipleSelect = <T = any,>({
|
|||
tagStyle,
|
||||
...props
|
||||
}: SelectProps<T>) => {
|
||||
const ref = useRef<HTMLButtonElement>(null);
|
||||
const SearchInputRef = useRef<HTMLInputElement>(null);
|
||||
const tagsContainerRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ const MultipleSelect = <T = any,>({
|
|||
onSelect(newValue);
|
||||
}
|
||||
},
|
||||
[inputValue, value, isSelectAll, onSelect]
|
||||
[inputValue, value, onSelect]
|
||||
);
|
||||
useEffect(() => {
|
||||
if (!isOpen) {
|
||||
|
|
@ -124,40 +124,6 @@ const MultipleSelect = <T = any,>({
|
|||
}
|
||||
}, [isOpen]);
|
||||
|
||||
useEffect(() => {
|
||||
const getWidth = (w: any) =>
|
||||
typeof w === 'number' ? w : typeof w === 'string' ? parseInt(w) : 0;
|
||||
|
||||
const totalWidth = getWidth(props.w) || 200;
|
||||
const tagWidth = getWidth(tagStyle?.w) || 60;
|
||||
const formLabelWidth = formLabel ? formLabel.length * 8 + 20 : 0;
|
||||
const availableWidth = totalWidth - formLabelWidth - 40;
|
||||
const overflowWidth = 30;
|
||||
|
||||
if (availableWidth <= 0) {
|
||||
setVisibleItems(selectedItems.length > 0 ? [selectedItems[0]] : []);
|
||||
setOverflowItems(selectedItems.slice(1));
|
||||
return;
|
||||
}
|
||||
|
||||
const { count } = selectedItems.reduce(
|
||||
(acc, item, i) => {
|
||||
const remain = selectedItems.length - i - 1;
|
||||
const needOverflow = remain > 0 ? overflowWidth : 0;
|
||||
if (acc.used + tagWidth + needOverflow <= availableWidth) {
|
||||
return {
|
||||
used: acc.used + tagWidth,
|
||||
count: i + 1
|
||||
};
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{ used: 0, count: 0 }
|
||||
);
|
||||
setVisibleItems(selectedItems.slice(0, count));
|
||||
setOverflowItems(selectedItems.slice(count));
|
||||
}, [selectedItems, isOpen, props.w, tagStyle, formLabel]);
|
||||
|
||||
const onclickItem = useCallback(
|
||||
(val: T) => {
|
||||
if (isSelectAll) {
|
||||
|
|
@ -172,15 +138,128 @@ const MultipleSelect = <T = any,>({
|
|||
onSelect([...value, val]);
|
||||
}
|
||||
},
|
||||
[value, isSelectAll, onSelect, setIsSelectAll]
|
||||
[isSelectAll, value, onSelect, list, setIsSelectAll]
|
||||
);
|
||||
|
||||
const onSelectAll = useCallback(() => {
|
||||
const hasSelected = isSelectAll || value.length > 0;
|
||||
onSelect(hasSelected ? [] : list.map((item) => item.value));
|
||||
onSelect(isSelectAll ? [] : list.map((item) => item.value));
|
||||
|
||||
setIsSelectAll?.((state) => !state);
|
||||
}, [value, list, setIsSelectAll, onSelect]);
|
||||
}, [isSelectAll, onSelect, list, setIsSelectAll]);
|
||||
|
||||
// 动态长度计算器 - 计算一行能展示多少个tag,剩余用+n表示
|
||||
const calculateLayout = useCallback(() => {
|
||||
if (!tagsContainerRef.current || selectedItems.length === 0) {
|
||||
setVisibleItems(selectedItems);
|
||||
setOverflowItems([]);
|
||||
return;
|
||||
}
|
||||
|
||||
const containerWidth = tagsContainerRef.current.offsetWidth;
|
||||
const tagGap = 4; // tag之间的gap
|
||||
const overflowIndicatorWidth = 30; // "+n" 宽度
|
||||
const formLabelWidth = formLabel ? formLabel.length * 8 + 20 : 0;
|
||||
|
||||
// 实际可用宽度
|
||||
const availableWidth = containerWidth - formLabelWidth - 10;
|
||||
|
||||
// 如果只有一个项目,直接显示
|
||||
if (selectedItems.length === 1) {
|
||||
setVisibleItems(selectedItems);
|
||||
setOverflowItems([]);
|
||||
return;
|
||||
}
|
||||
|
||||
// 创建临时元素来测量每个tag的实际宽度
|
||||
const measureTagWidth = (item: any): number => {
|
||||
// 如果有tagStyle.w,优先使用
|
||||
if (tagStyle?.w) {
|
||||
return typeof tagStyle.w === 'number' ? tagStyle.w : parseInt(String(tagStyle.w)) || 60;
|
||||
}
|
||||
|
||||
// 否则根据文本长度估算(更精确)
|
||||
const text = String(item.label || item.value);
|
||||
const baseWidth = 16; // 基础padding
|
||||
const charWidth = 8; // 每个字符约8px
|
||||
const closeIconWidth = closeable ? 20 : 0; // 关闭按钮宽度
|
||||
|
||||
return baseWidth + text.length * charWidth + closeIconWidth;
|
||||
};
|
||||
|
||||
// 确保至少显示1个tag
|
||||
const firstTagWidth = measureTagWidth(selectedItems[0]);
|
||||
|
||||
// 如果连第一个tag都放不下,也要强制显示
|
||||
if (availableWidth < firstTagWidth) {
|
||||
setVisibleItems([selectedItems[0]]);
|
||||
setOverflowItems(selectedItems.slice(1));
|
||||
return;
|
||||
}
|
||||
|
||||
// 精确计算每个tag的宽度
|
||||
let usedWidth = 0;
|
||||
let visibleCount = 0;
|
||||
|
||||
for (let i = 0; i < selectedItems.length; i++) {
|
||||
const currentTagWidth = measureTagWidth(selectedItems[i]);
|
||||
const currentGap = i > 0 ? tagGap : 0;
|
||||
const remainingItems = selectedItems.length - i - 1;
|
||||
const needsOverflow = remainingItems > 0;
|
||||
const overflowSpace = needsOverflow ? overflowIndicatorWidth + tagGap : 0;
|
||||
|
||||
const totalNeeded = usedWidth + currentTagWidth + currentGap + overflowSpace;
|
||||
|
||||
if (totalNeeded <= availableWidth) {
|
||||
usedWidth += currentTagWidth + currentGap;
|
||||
visibleCount = i + 1;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 保证至少显示1个tag
|
||||
if (visibleCount === 0) {
|
||||
visibleCount = 1;
|
||||
}
|
||||
|
||||
setVisibleItems(selectedItems.slice(0, visibleCount));
|
||||
setOverflowItems(selectedItems.slice(visibleCount));
|
||||
}, [closeable, formLabel, selectedItems, tagStyle?.w]);
|
||||
|
||||
// 动态监听容器宽度变化并重新计算布局
|
||||
useEffect(() => {
|
||||
if (!tagsContainerRef.current) return;
|
||||
|
||||
// 创建 ResizeObserver 监听容器宽度变化
|
||||
const resizeObserver = new ResizeObserver((entries) => {
|
||||
for (const entry of entries) {
|
||||
// 当容器宽度发生变化时,触发重新计算
|
||||
requestAnimationFrame(() => {
|
||||
calculateLayout();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 开始监听容器
|
||||
resizeObserver.observe(tagsContainerRef.current);
|
||||
|
||||
// 初始计算
|
||||
requestAnimationFrame(() => {
|
||||
calculateLayout();
|
||||
});
|
||||
|
||||
// 清理监听器
|
||||
return () => {
|
||||
resizeObserver.disconnect();
|
||||
};
|
||||
}, [calculateLayout]);
|
||||
|
||||
// 当选中项目、样式等发生变化时重新计算
|
||||
useEffect(() => {
|
||||
requestAnimationFrame(() => {
|
||||
calculateLayout();
|
||||
});
|
||||
}, [calculateLayout]);
|
||||
|
||||
const ListRender = useMemo(() => {
|
||||
return (
|
||||
|
|
@ -215,7 +294,7 @@ const MultipleSelect = <T = any,>({
|
|||
})}
|
||||
</>
|
||||
);
|
||||
}, [value, list, isSelectAll]);
|
||||
}, [list, isSelectAll, value, onclickItem]);
|
||||
|
||||
return (
|
||||
<Box h={'100%'} w={'100%'}>
|
||||
|
|
@ -230,7 +309,6 @@ const MultipleSelect = <T = any,>({
|
|||
>
|
||||
<MenuButton
|
||||
as={Flex}
|
||||
ref={ref}
|
||||
px={3}
|
||||
alignItems={'center'}
|
||||
borderRadius={'md'}
|
||||
|
|
|
|||
|
|
@ -9,20 +9,26 @@
|
|||
import { useMemo, useState, useTransition } from 'react';
|
||||
import { LexicalComposer } from '@lexical/react/LexicalComposer';
|
||||
import { PlainTextPlugin } from '@lexical/react/LexicalPlainTextPlugin';
|
||||
import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin';
|
||||
import { ContentEditable } from '@lexical/react/LexicalContentEditable';
|
||||
import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin';
|
||||
import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin';
|
||||
import { ListPlugin } from '@lexical/react/LexicalListPlugin';
|
||||
import { CheckListPlugin } from '@lexical/react/LexicalCheckListPlugin';
|
||||
import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary';
|
||||
import { HeadingNode, QuoteNode } from '@lexical/rich-text';
|
||||
import { ListItemNode, ListNode } from '@lexical/list';
|
||||
import { CodeHighlightNode, CodeNode } from '@lexical/code';
|
||||
import VariableLabelPickerPlugin from './plugins/VariableLabelPickerPlugin';
|
||||
import ListDisplayFixPlugin from './plugins/ListDisplayFixPlugin';
|
||||
import { Box, Flex } from '@chakra-ui/react';
|
||||
import styles from './index.module.scss';
|
||||
import VariablePlugin from './plugins/VariablePlugin';
|
||||
import { VariableNode } from './plugins/VariablePlugin/node';
|
||||
import type { EditorState, LexicalEditor } from 'lexical';
|
||||
import OnBlurPlugin from './plugins/OnBlurPlugin';
|
||||
import MyIcon from '../../Icon';
|
||||
import type { FormPropsType } from './type.d';
|
||||
import { type EditorVariableLabelPickerType, type EditorVariablePickerType } from './type.d';
|
||||
import type { FormPropsType } from './type';
|
||||
import { type EditorVariableLabelPickerType, type EditorVariablePickerType } from './type';
|
||||
import { getNanoid } from '@fastgpt/global/common/string/tools';
|
||||
import FocusPlugin from './plugins/FocusPlugin';
|
||||
import { textToEditorState } from './utils';
|
||||
|
|
@ -31,8 +37,38 @@ import { VariableLabelNode } from './plugins/VariableLabelPlugin/node';
|
|||
import VariableLabelPlugin from './plugins/VariableLabelPlugin';
|
||||
import { useDeepCompareEffect } from 'ahooks';
|
||||
import VariablePickerPlugin from './plugins/VariablePickerPlugin';
|
||||
import MarkdownPlugin from './plugins/MarkdownPlugin';
|
||||
import MyIcon from '../../Icon';
|
||||
import TabToSpacesPlugin from './plugins/TabToSpacesPlugin';
|
||||
import ListExitPlugin from './plugins/ListExitPlugin';
|
||||
|
||||
const Placeholder = ({ children }: { children: React.ReactNode }) => (
|
||||
<Box
|
||||
position={'absolute'}
|
||||
top={0}
|
||||
left={0}
|
||||
right={0}
|
||||
bottom={0}
|
||||
py={3}
|
||||
px={3.5}
|
||||
pointerEvents={'none'}
|
||||
overflow={'hidden'}
|
||||
>
|
||||
<Box
|
||||
color={'myGray.400'}
|
||||
fontSize={'mini'}
|
||||
userSelect={'none'}
|
||||
whiteSpace={'pre-wrap'}
|
||||
wordBreak={'break-all'}
|
||||
h={'100%'}
|
||||
>
|
||||
{children}
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
|
||||
export type EditorProps = {
|
||||
isRichText?: boolean;
|
||||
variables?: EditorVariablePickerType[];
|
||||
variableLabels?: EditorVariableLabelPickerType[];
|
||||
value?: string;
|
||||
|
|
@ -50,6 +86,7 @@ export type EditorProps = {
|
|||
};
|
||||
|
||||
export default function Editor({
|
||||
isRichText = false,
|
||||
minH = 200,
|
||||
maxH = 400,
|
||||
maxLength,
|
||||
|
|
@ -71,7 +108,7 @@ export default function Editor({
|
|||
onOpenModal?: () => void;
|
||||
onChange: (editorState: EditorState, editor: LexicalEditor) => void;
|
||||
onChangeText?: ((text: string) => void) | undefined;
|
||||
onBlur: (editor: LexicalEditor) => void;
|
||||
onBlur?: (editor: LexicalEditor) => void;
|
||||
}) {
|
||||
const [key, setKey] = useState(getNanoid(6));
|
||||
const [_, startSts] = useTransition();
|
||||
|
|
@ -79,8 +116,17 @@ export default function Editor({
|
|||
const [scrollHeight, setScrollHeight] = useState(0);
|
||||
|
||||
const initialConfig = {
|
||||
namespace: 'promptEditor',
|
||||
nodes: [VariableNode, VariableLabelNode],
|
||||
namespace: isRichText ? 'richPromptEditor' : 'promptEditor',
|
||||
nodes: [
|
||||
VariableNode,
|
||||
VariableLabelNode,
|
||||
HeadingNode,
|
||||
ListNode,
|
||||
ListItemNode,
|
||||
QuoteNode,
|
||||
CodeNode,
|
||||
CodeHighlightNode
|
||||
],
|
||||
editorState: textToEditorState(value),
|
||||
onError: (error: Error) => {
|
||||
throw error;
|
||||
|
|
@ -125,59 +171,75 @@ export default function Editor({
|
|||
borderRadius={'md'}
|
||||
>
|
||||
<LexicalComposer initialConfig={initialConfig} key={key}>
|
||||
<PlainTextPlugin
|
||||
contentEditable={
|
||||
<ContentEditable
|
||||
className={isInvalid ? styles.contentEditable_invalid : styles.contentEditable}
|
||||
style={{
|
||||
minHeight: `${minH}px`,
|
||||
maxHeight: `${maxH}px`
|
||||
}}
|
||||
/>
|
||||
}
|
||||
placeholder={
|
||||
<Box
|
||||
position={'absolute'}
|
||||
top={0}
|
||||
left={0}
|
||||
right={0}
|
||||
bottom={0}
|
||||
py={3}
|
||||
px={3.5}
|
||||
pointerEvents={'none'}
|
||||
overflow={'hidden'}
|
||||
>
|
||||
<Box
|
||||
color={'myGray.400'}
|
||||
fontSize={'mini'}
|
||||
userSelect={'none'}
|
||||
whiteSpace={'pre-wrap'}
|
||||
wordBreak={'break-all'}
|
||||
h={'100%'}
|
||||
>
|
||||
{placeholder}
|
||||
</Box>
|
||||
</Box>
|
||||
}
|
||||
ErrorBoundary={LexicalErrorBoundary}
|
||||
/>
|
||||
<HistoryPlugin />
|
||||
<MaxLengthPlugin maxLength={maxLength || 999999} />
|
||||
<FocusPlugin focus={focus} setFocus={setFocus} />
|
||||
<OnChangePlugin
|
||||
onChange={(editorState, editor) => {
|
||||
const rootElement = editor.getRootElement();
|
||||
setScrollHeight(rootElement?.scrollHeight || 0);
|
||||
startSts(() => {
|
||||
onChange?.(editorState, editor);
|
||||
});
|
||||
}}
|
||||
/>
|
||||
<VariableLabelPlugin variables={variableLabels} />
|
||||
<VariablePlugin variables={variables} />
|
||||
<VariableLabelPickerPlugin variables={variableLabels} isFocus={focus} />
|
||||
<VariablePickerPlugin variables={variableLabels.length > 0 ? [] : variables} />
|
||||
<OnBlurPlugin onBlur={onBlur} />
|
||||
{/* Text type */}
|
||||
{isRichText ? (
|
||||
<RichTextPlugin
|
||||
contentEditable={
|
||||
<ContentEditable
|
||||
className={`${isInvalid ? styles.contentEditable_invalid : styles.contentEditable} ${styles.richText}`}
|
||||
style={{
|
||||
minHeight: `${minH}px`,
|
||||
maxHeight: `${maxH}px`
|
||||
}}
|
||||
onFocus={() => setFocus(true)}
|
||||
onBlur={() => setFocus(false)}
|
||||
/>
|
||||
}
|
||||
placeholder={<Placeholder>{placeholder}</Placeholder>}
|
||||
ErrorBoundary={LexicalErrorBoundary}
|
||||
/>
|
||||
) : (
|
||||
<PlainTextPlugin
|
||||
contentEditable={
|
||||
<ContentEditable
|
||||
className={isInvalid ? styles.contentEditable_invalid : styles.contentEditable}
|
||||
style={{
|
||||
minHeight: `${minH}px`,
|
||||
maxHeight: `${maxH}px`
|
||||
}}
|
||||
/>
|
||||
}
|
||||
placeholder={<Placeholder>{placeholder}</Placeholder>}
|
||||
ErrorBoundary={LexicalErrorBoundary}
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* Basic Plugin */}
|
||||
<>
|
||||
<HistoryPlugin />
|
||||
<MaxLengthPlugin maxLength={maxLength || 999999} />
|
||||
<FocusPlugin focus={focus} setFocus={setFocus} />
|
||||
|
||||
<VariablePlugin variables={variables} />
|
||||
{variableLabels.length > 0 && (
|
||||
<>
|
||||
<VariableLabelPlugin variables={variableLabels} />
|
||||
<VariableLabelPickerPlugin variables={variableLabels} isFocus={focus} />
|
||||
</>
|
||||
)}
|
||||
{variableLabels.length > 0 && <VariablePickerPlugin variables={variables} />}
|
||||
<OnBlurPlugin onBlur={onBlur} />
|
||||
<ListDisplayFixPlugin />
|
||||
<OnChangePlugin
|
||||
onChange={(editorState, editor) => {
|
||||
const rootElement = editor.getRootElement();
|
||||
setScrollHeight(rootElement?.scrollHeight || 0);
|
||||
startSts(() => {
|
||||
onChange?.(editorState, editor);
|
||||
});
|
||||
}}
|
||||
/>
|
||||
|
||||
{isRichText && (
|
||||
<>
|
||||
{/* <ListPlugin />
|
||||
<CheckListPlugin />
|
||||
<ListExitPlugin /> */}
|
||||
<TabToSpacesPlugin />
|
||||
{/* <MarkdownPlugin /> */}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
</LexicalComposer>
|
||||
|
||||
{onChangeText &&
|
||||
|
|
|
|||
|
|
@ -76,3 +76,14 @@
|
|||
color: var(--chakra-colors-primary-600);
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
.richText {
|
||||
ul,
|
||||
ol {
|
||||
padding-left: 16px;
|
||||
|
||||
li::marker {
|
||||
color: var(--chakra-colors-primary-600);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
import { Box, Button, ModalBody, ModalFooter, useDisclosure } from '@chakra-ui/react';
|
||||
import React, { useMemo } from 'react';
|
||||
import React, { useMemo, useCallback } from 'react';
|
||||
import { editorStateToText } from './utils';
|
||||
import type { EditorProps } from './Editor';
|
||||
import Editor from './Editor';
|
||||
import MyModal from '../../MyModal';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import type { EditorState, LexicalEditor } from 'lexical';
|
||||
import type { FormPropsType } from './type.d';
|
||||
import { useCallback } from 'react';
|
||||
import type { FormPropsType } from './type';
|
||||
|
||||
const PromptEditor = ({
|
||||
showOpenModal = true,
|
||||
|
|
@ -34,18 +33,27 @@ const PromptEditor = ({
|
|||
},
|
||||
[onChange]
|
||||
);
|
||||
|
||||
const onBlurInput = useCallback(
|
||||
(editor: LexicalEditor) => {
|
||||
const text = editorStateToText(editor);
|
||||
onBlur?.(text);
|
||||
if (onBlur) {
|
||||
const text = editorStateToText(editor);
|
||||
onBlur(text);
|
||||
}
|
||||
},
|
||||
[onBlur]
|
||||
);
|
||||
|
||||
const formattedValue = useMemo(() => {
|
||||
if (typeof value === 'object') {
|
||||
return JSON.stringify(value);
|
||||
}
|
||||
return value;
|
||||
|
||||
if (value === undefined || value === null) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return String(value || '');
|
||||
}, [value]);
|
||||
|
||||
return (
|
||||
|
|
@ -74,6 +82,7 @@ const PromptEditor = ({
|
|||
/>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
<MyModal
|
||||
isOpen={isOpen}
|
||||
onClose={onClose}
|
||||
|
|
@ -102,4 +111,5 @@ const PromptEditor = ({
|
|||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(PromptEditor);
|
||||
|
|
|
|||
|
|
@ -1,93 +0,0 @@
|
|||
import { Box, Flex } from '@chakra-ui/react';
|
||||
import { type EditorVariablePickerType } from '../../type';
|
||||
import MyIcon from '../../../../Icon';
|
||||
import React, { useCallback, useEffect } from 'react';
|
||||
|
||||
export default function DropDownMenu({
|
||||
variables,
|
||||
setDropdownValue
|
||||
}: {
|
||||
variables: EditorVariablePickerType[];
|
||||
setDropdownValue?: (value: string) => void;
|
||||
}) {
|
||||
const [highlightedIndex, setHighlightedIndex] = React.useState(0);
|
||||
|
||||
const handleKeyDown = useCallback(
|
||||
(event: any) => {
|
||||
if (event.keyCode === 38) {
|
||||
setHighlightedIndex((prevIndex) => Math.max(prevIndex - 1, 0));
|
||||
} else if (event.keyCode === 40) {
|
||||
setHighlightedIndex((prevIndex) => Math.min(prevIndex + 1, variables.length - 1));
|
||||
} else if (event.keyCode === 13 && variables[highlightedIndex]?.key) {
|
||||
setDropdownValue?.(variables[highlightedIndex].key);
|
||||
}
|
||||
},
|
||||
[highlightedIndex, variables]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
document.addEventListener('keydown', handleKeyDown);
|
||||
|
||||
return () => {
|
||||
document.removeEventListener('keydown', handleKeyDown);
|
||||
};
|
||||
}, [handleKeyDown]);
|
||||
|
||||
return variables.length ? (
|
||||
<Box
|
||||
bg={'white'}
|
||||
boxShadow={'lg'}
|
||||
borderWidth={'1px'}
|
||||
borderColor={'borderColor.base'}
|
||||
p={2}
|
||||
borderRadius={'md'}
|
||||
position={'absolute'}
|
||||
top={'100%'}
|
||||
w={'auto'}
|
||||
zIndex={99999}
|
||||
maxH={'300px'}
|
||||
overflow={'auto'}
|
||||
className="nowheel"
|
||||
>
|
||||
{variables.map((item, index) => (
|
||||
<Flex
|
||||
alignItems={'center'}
|
||||
as={'li'}
|
||||
key={item.key}
|
||||
px={4}
|
||||
py={2}
|
||||
borderRadius={'sm'}
|
||||
cursor={'pointer'}
|
||||
maxH={'300px'}
|
||||
overflow={'auto'}
|
||||
_notLast={{
|
||||
mb: 2
|
||||
}}
|
||||
{...(highlightedIndex === index
|
||||
? {
|
||||
bg: 'primary.50',
|
||||
color: 'primary.600'
|
||||
}
|
||||
: {
|
||||
bg: 'white',
|
||||
color: 'myGray.600'
|
||||
})}
|
||||
onMouseDown={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
setDropdownValue?.(item.key);
|
||||
}}
|
||||
onMouseEnter={() => {
|
||||
setHighlightedIndex(index);
|
||||
}}
|
||||
>
|
||||
<MyIcon name={(item.icon as any) || 'core/modules/variable'} w={'14px'} />
|
||||
<Box ml={2} fontSize={'sm'}>
|
||||
{item.key}
|
||||
{item.key !== item.label && `(${item.label})`}
|
||||
</Box>
|
||||
</Flex>
|
||||
))}
|
||||
</Box>
|
||||
) : null;
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export default function ListDisplayFixPlugin(): JSX.Element | null {
|
||||
const [editor] = useLexicalComposerContext();
|
||||
|
||||
useEffect(() => {
|
||||
const fixListDisplay = () => {
|
||||
const rootElement = editor.getRootElement();
|
||||
if (!rootElement) return;
|
||||
|
||||
const allListItems = rootElement.querySelectorAll('li');
|
||||
|
||||
allListItems.forEach((li) => {
|
||||
const htmlLi = li as HTMLLIElement;
|
||||
|
||||
// Check if this li only contains a sublist without direct text content
|
||||
const hasDirectText = Array.from(htmlLi.childNodes).some((node) => {
|
||||
return node.nodeType === Node.TEXT_NODE && node.textContent?.trim();
|
||||
});
|
||||
|
||||
const hasSpan = htmlLi.querySelector(':scope > span');
|
||||
const hasOnlySublist =
|
||||
htmlLi.children.length === 1 &&
|
||||
(htmlLi.children[0].tagName === 'UL' || htmlLi.children[0].tagName === 'OL');
|
||||
|
||||
// If this li only contains a sublist without text content, hide its marker
|
||||
if (!hasDirectText && !hasSpan && hasOnlySublist) {
|
||||
// Only hide the marker, don't adjust position, let CSS handle indentation
|
||||
htmlLi.style.listStyle = 'none';
|
||||
htmlLi.style.paddingLeft = '0';
|
||||
htmlLi.style.marginLeft = '0';
|
||||
|
||||
// Keep normal indentation for sublists
|
||||
const sublist = htmlLi.children[0] as HTMLElement;
|
||||
sublist.style.marginTop = '0';
|
||||
sublist.style.marginBottom = '0';
|
||||
// Don't modify marginLeft and paddingLeft, let CSS handle it
|
||||
} else {
|
||||
htmlLi.style.listStyle = '';
|
||||
htmlLi.style.paddingLeft = '';
|
||||
htmlLi.style.marginLeft = '';
|
||||
|
||||
if (
|
||||
htmlLi.children[0] &&
|
||||
(htmlLi.children[0].tagName === 'UL' || htmlLi.children[0].tagName === 'OL')
|
||||
) {
|
||||
const sublist = htmlLi.children[0] as HTMLElement;
|
||||
sublist.style.marginTop = '';
|
||||
sublist.style.marginBottom = '';
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const removeListener = editor.registerUpdateListener(() => {
|
||||
setTimeout(fixListDisplay, 10);
|
||||
});
|
||||
|
||||
setTimeout(fixListDisplay, 10);
|
||||
|
||||
return removeListener;
|
||||
}, [editor]);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
||||
import { useEffect } from 'react';
|
||||
import {
|
||||
$getSelection,
|
||||
$isRangeSelection,
|
||||
COMMAND_PRIORITY_HIGH,
|
||||
KEY_ENTER_COMMAND,
|
||||
KEY_BACKSPACE_COMMAND,
|
||||
$createParagraphNode
|
||||
} from 'lexical';
|
||||
import { $isListItemNode, $isListNode } from '@lexical/list';
|
||||
|
||||
export default function ListExitPlugin(): JSX.Element | null {
|
||||
const [editor] = useLexicalComposerContext();
|
||||
|
||||
useEffect(() => {
|
||||
const handleEnterKey = () => {
|
||||
let handled = false;
|
||||
|
||||
editor.update(() => {
|
||||
const selection = $getSelection();
|
||||
if (!$isRangeSelection(selection)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const anchorNode = selection.anchor.getNode();
|
||||
const listItemNode = anchorNode.getParent();
|
||||
|
||||
if ($isListItemNode(listItemNode)) {
|
||||
// Check if the list item is empty
|
||||
const textContent = listItemNode.getTextContent().trim();
|
||||
|
||||
if (textContent === '') {
|
||||
// Remove the empty list item and exit list mode
|
||||
const listNode = listItemNode.getParent();
|
||||
|
||||
if ($isListNode(listNode)) {
|
||||
// If this is the only item in the list, remove the entire list
|
||||
if (listNode.getChildrenSize() === 1) {
|
||||
listNode.remove();
|
||||
} else {
|
||||
// Remove just this list item
|
||||
listItemNode.remove();
|
||||
}
|
||||
|
||||
// Insert a paragraph after the list to exit list mode
|
||||
const paragraph = $createParagraphNode();
|
||||
if (listNode && !listNode.isAttached()) {
|
||||
// If we removed the entire list, replace it with a paragraph
|
||||
listNode.getParent()?.append(paragraph);
|
||||
} else {
|
||||
// Insert paragraph after the list
|
||||
listNode?.insertAfter(paragraph);
|
||||
}
|
||||
|
||||
paragraph.select();
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return handled;
|
||||
};
|
||||
|
||||
const handleBackspaceKey = (event: KeyboardEvent) => {
|
||||
const selection = $getSelection();
|
||||
if (!$isRangeSelection(selection)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const anchorNode = selection.anchor.getNode();
|
||||
const listItemNode = anchorNode.getParent();
|
||||
|
||||
if ($isListItemNode(listItemNode)) {
|
||||
// Check if cursor is at the beginning of an empty list item
|
||||
const textContent = listItemNode.getTextContent().trim();
|
||||
const cursorOffset = selection.anchor.offset;
|
||||
|
||||
// Only handle empty list items with cursor at the beginning
|
||||
if (textContent === '' && cursorOffset === 0) {
|
||||
// Prevent default backspace behavior
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
editor.update(() => {
|
||||
const listNode = listItemNode.getParent();
|
||||
|
||||
if ($isListNode(listNode)) {
|
||||
// Create a new paragraph
|
||||
const paragraph = $createParagraphNode();
|
||||
|
||||
// Always insert after the current list item and remove it
|
||||
// This ensures the paragraph appears at the current position
|
||||
listItemNode.insertAfter(paragraph);
|
||||
listItemNode.remove();
|
||||
|
||||
// If the list is now empty, remove it
|
||||
if (listNode.getChildrenSize() === 0) {
|
||||
listNode.remove();
|
||||
}
|
||||
|
||||
// Focus the new paragraph
|
||||
paragraph.select();
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
// Register the keyboard event handlers
|
||||
const removeEnterListener = editor.registerCommand(
|
||||
KEY_ENTER_COMMAND,
|
||||
handleEnterKey,
|
||||
COMMAND_PRIORITY_HIGH
|
||||
);
|
||||
|
||||
const removeBackspaceListener = editor.registerCommand(
|
||||
KEY_BACKSPACE_COMMAND,
|
||||
handleBackspaceKey,
|
||||
COMMAND_PRIORITY_HIGH
|
||||
);
|
||||
|
||||
return () => {
|
||||
removeEnterListener();
|
||||
removeBackspaceListener();
|
||||
};
|
||||
}, [editor]);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
import type { JSX } from 'react';
|
||||
import { MarkdownShortcutPlugin } from '@lexical/react/LexicalMarkdownShortcutPlugin';
|
||||
import * as React from 'react';
|
||||
import { RICH_PROMPT_TRANSFORMERS } from '../MarkdownTransformers';
|
||||
|
||||
export default function MarkdownPlugin(): JSX.Element {
|
||||
return <MarkdownShortcutPlugin transformers={RICH_PROMPT_TRANSFORMERS} />;
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import {
|
||||
CHECK_LIST,
|
||||
ELEMENT_TRANSFORMERS,
|
||||
TEXT_FORMAT_TRANSFORMERS,
|
||||
type Transformer
|
||||
} from '@lexical/markdown';
|
||||
|
||||
export const RICH_PROMPT_TRANSFORMERS: Array<Transformer> = [
|
||||
CHECK_LIST,
|
||||
...ELEMENT_TRANSFORMERS,
|
||||
...TEXT_FORMAT_TRANSFORMERS
|
||||
];
|
||||
|
|
@ -0,0 +1,216 @@
|
|||
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
||||
import {
|
||||
KEY_TAB_COMMAND,
|
||||
COMMAND_PRIORITY_EDITOR,
|
||||
$getSelection,
|
||||
$isRangeSelection,
|
||||
$isTextNode
|
||||
} from 'lexical';
|
||||
import { $createTextNode } from 'lexical';
|
||||
import { $isListNode, $isListItemNode } from '@lexical/list';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export default function TabToSpacesPlugin(): null {
|
||||
const [editor] = useLexicalComposerContext();
|
||||
|
||||
useEffect(() => {
|
||||
return editor.registerCommand(
|
||||
KEY_TAB_COMMAND,
|
||||
(event) => {
|
||||
try {
|
||||
const selection = $getSelection();
|
||||
if (!$isRangeSelection(selection)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if we're in a list context
|
||||
let isInList = false;
|
||||
try {
|
||||
const nodes = selection.getNodes();
|
||||
isInList = nodes.some((node) => {
|
||||
// Check if current node or any of its ancestors is a list or list item
|
||||
let currentNode = node;
|
||||
while (currentNode) {
|
||||
try {
|
||||
if ($isListNode(currentNode) || $isListItemNode(currentNode)) {
|
||||
return true;
|
||||
}
|
||||
// @ts-ignore
|
||||
currentNode = currentNode.getParent();
|
||||
} catch (e) {
|
||||
// If node is no longer valid, break the loop
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
} catch (e) {
|
||||
// If we can't get nodes safely, assume we're not in a list
|
||||
isInList = false;
|
||||
}
|
||||
|
||||
// If we're in a list, let the built-in list indentation handle it
|
||||
if (isInList) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only handle tab for non-list contexts
|
||||
event.preventDefault();
|
||||
|
||||
const isShiftTab = event.shiftKey;
|
||||
|
||||
// Handle Shift+Tab (outdent)
|
||||
if (isShiftTab) {
|
||||
if (!selection.isCollapsed()) {
|
||||
// For selected text, remove 4 spaces from the beginning of each line
|
||||
try {
|
||||
const selectedText = selection.getTextContent();
|
||||
const lines = selectedText.split('\n');
|
||||
|
||||
const outdentedText = lines
|
||||
.map((line) => {
|
||||
// Remove up to 4 spaces from the beginning of the line
|
||||
if (line.startsWith(' ')) {
|
||||
return line.slice(4);
|
||||
} else if (line.startsWith(' ')) {
|
||||
return line.slice(3);
|
||||
} else if (line.startsWith(' ')) {
|
||||
return line.slice(2);
|
||||
} else if (line.startsWith(' ')) {
|
||||
return line.slice(1);
|
||||
}
|
||||
return line;
|
||||
})
|
||||
.join('\n');
|
||||
|
||||
// Insert the outdented text and let Lexical handle cursor positioning
|
||||
selection.insertText(outdentedText);
|
||||
|
||||
// Schedule selection restoration in the next update cycle
|
||||
setTimeout(() => {
|
||||
editor.update(() => {
|
||||
const currentSelection = $getSelection();
|
||||
if ($isRangeSelection(currentSelection) && !currentSelection.isCollapsed()) {
|
||||
// Selection is already maintained, do nothing
|
||||
return;
|
||||
}
|
||||
|
||||
// If selection was lost, try to select the inserted text
|
||||
if ($isRangeSelection(currentSelection)) {
|
||||
const currentOffset = currentSelection.anchor.offset;
|
||||
const selectionStart = Math.max(0, currentOffset - outdentedText.length);
|
||||
|
||||
currentSelection.anchor.set(
|
||||
currentSelection.anchor.key,
|
||||
selectionStart,
|
||||
'text'
|
||||
);
|
||||
currentSelection.focus.set(currentSelection.focus.key, currentOffset, 'text');
|
||||
}
|
||||
});
|
||||
}, 0);
|
||||
|
||||
return true;
|
||||
} catch (e) {
|
||||
// If operation fails, do nothing
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
// For cursor position, try to remove spaces before cursor
|
||||
try {
|
||||
const anchorNode = selection.anchor.getNode();
|
||||
const anchorOffset = selection.anchor.offset;
|
||||
|
||||
if ($isTextNode(anchorNode)) {
|
||||
const textContent = anchorNode.getTextContent();
|
||||
const beforeCursor = textContent.slice(0, anchorOffset);
|
||||
const afterCursor = textContent.slice(anchorOffset);
|
||||
|
||||
// Check if there are spaces before cursor to remove
|
||||
let spacesToRemove = 0;
|
||||
for (let i = beforeCursor.length - 1; i >= 0 && spacesToRemove < 4; i--) {
|
||||
if (beforeCursor[i] === ' ') {
|
||||
spacesToRemove++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (spacesToRemove > 0) {
|
||||
const newTextContent =
|
||||
beforeCursor.slice(0, beforeCursor.length - spacesToRemove) + afterCursor;
|
||||
anchorNode.setTextContent(newTextContent);
|
||||
selection.anchor.set(
|
||||
anchorNode.getKey(),
|
||||
anchorOffset - spacesToRemove,
|
||||
'text'
|
||||
);
|
||||
selection.focus.set(anchorNode.getKey(), anchorOffset - spacesToRemove, 'text');
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} catch (e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Handle regular Tab (indent)
|
||||
if (!selection.isCollapsed()) {
|
||||
try {
|
||||
const selectedText = selection.getTextContent();
|
||||
const lines = selectedText.split('\n');
|
||||
const indentedText = lines.map((line) => ' ' + line).join('\n');
|
||||
|
||||
// Insert the indented text and let Lexical handle cursor positioning
|
||||
selection.insertText(indentedText);
|
||||
|
||||
// Schedule selection restoration in the next update cycle
|
||||
setTimeout(() => {
|
||||
editor.update(() => {
|
||||
const currentSelection = $getSelection();
|
||||
if ($isRangeSelection(currentSelection) && !currentSelection.isCollapsed()) {
|
||||
// Selection is already maintained, do nothing
|
||||
return;
|
||||
}
|
||||
|
||||
// If selection was lost, try to select the inserted text
|
||||
if ($isRangeSelection(currentSelection)) {
|
||||
const currentOffset = currentSelection.anchor.offset;
|
||||
const selectionStart = Math.max(0, currentOffset - indentedText.length);
|
||||
|
||||
currentSelection.anchor.set(
|
||||
currentSelection.anchor.key,
|
||||
selectionStart,
|
||||
'text'
|
||||
);
|
||||
currentSelection.focus.set(currentSelection.focus.key, currentOffset, 'text');
|
||||
}
|
||||
});
|
||||
}, 0);
|
||||
|
||||
return true;
|
||||
} catch (e) {
|
||||
// If selection operation fails, fall back to simple space insertion
|
||||
const textNode = $createTextNode(' ');
|
||||
selection.insertNodes([textNode]);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
// For cursor position (no selection), insert 4 spaces
|
||||
const textNode = $createTextNode(' '); // 4 spaces
|
||||
selection.insertNodes([textNode]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// If anything fails, just let the default behavior handle it
|
||||
console.warn('TabToSpacesPlugin error:', e);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
COMMAND_PRIORITY_EDITOR
|
||||
);
|
||||
}, [editor]);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import type { DecoratorNode, Klass, LexicalEditor, LexicalNode } from 'lexical';
|
||||
import type { EntityMatch } from '@lexical/text';
|
||||
import { $createTextNode, $getRoot, $isTextNode, TextNode } from 'lexical';
|
||||
import { $createTextNode, $isTextNode, TextNode } from 'lexical';
|
||||
import { useCallback } from 'react';
|
||||
import type { VariableLabelNode } from './plugins/VariableLabelPlugin/node';
|
||||
import type { VariableNode } from './plugins/VariablePlugin/node';
|
||||
|
|
@ -209,36 +209,9 @@ export function textToEditorState(text = '') {
|
|||
});
|
||||
}
|
||||
|
||||
export function editorStateToText(editor: LexicalEditor) {
|
||||
const editorStateTextString: string[] = [];
|
||||
const paragraphs = editor.getEditorState().toJSON().root.children;
|
||||
paragraphs.forEach((paragraph: any) => {
|
||||
const children = paragraph.children;
|
||||
const paragraphText: string[] = [];
|
||||
children.forEach((child: any) => {
|
||||
if (child.type === 'linebreak') {
|
||||
paragraphText.push(`
|
||||
`);
|
||||
} else if (child.text) {
|
||||
paragraphText.push(child.text);
|
||||
} else if (child.type === 'variableLabel') {
|
||||
paragraphText.push(child.variableKey);
|
||||
} else if (child.type === 'Variable') {
|
||||
paragraphText.push(child.variableKey);
|
||||
}
|
||||
});
|
||||
editorStateTextString.push(paragraphText.join(''));
|
||||
});
|
||||
return editorStateTextString.join(`
|
||||
`);
|
||||
}
|
||||
|
||||
const varRegex = /\{\{([a-zA-Z_][a-zA-Z0-9_]*)\}\}/g;
|
||||
export const getVars = (value: string) => {
|
||||
if (!value) return [];
|
||||
// .filter((item) => {
|
||||
// return ![CONTEXT_PLACEHOLDER_TEXT, HISTORY_PLACEHOLDER_TEXT, QUERY_PLACEHOLDER_TEXT, PRE_PROMPT_PLACEHOLDER_TEXT].includes(item)
|
||||
// })
|
||||
const keys =
|
||||
value
|
||||
.match(varRegex)
|
||||
|
|
@ -292,3 +265,23 @@ export function useBasicTypeaheadTriggerMatch(
|
|||
[maxLength, minLength, trigger]
|
||||
);
|
||||
}
|
||||
|
||||
export function editorStateToText(editor: LexicalEditor) {
|
||||
const editorStateTextString: string[] = [];
|
||||
const paragraphs = editor.getEditorState().toJSON().root.children;
|
||||
paragraphs.forEach((paragraph: any) => {
|
||||
const children = paragraph.children || [];
|
||||
const paragraphText: string[] = [];
|
||||
children.forEach((child: any) => {
|
||||
if (child.type === 'linebreak') {
|
||||
paragraphText.push('\n');
|
||||
} else if (child.text) {
|
||||
paragraphText.push(child.text);
|
||||
} else if (child.type === 'variableLabel' || child.type === 'Variable') {
|
||||
paragraphText.push(child.variableKey);
|
||||
}
|
||||
});
|
||||
editorStateTextString.push(paragraphText.join(''));
|
||||
});
|
||||
return editorStateTextString.join('\n');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,61 +1,10 @@
|
|||
import { FlowNodeTemplateTypeEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import { i18nT } from '../../i18n/utils';
|
||||
import type { PluginGroupSchemaType, TGroupType } from '../../../service/core/app/plugin/type';
|
||||
import type { SystemToolGroupSchemaType } from '../../../service/core/app/plugin/type';
|
||||
import { AppTemplateTypeEnum } from '@fastgpt/global/core/app/constants';
|
||||
import { type TemplateTypeSchemaType } from '@fastgpt/global/core/app/type';
|
||||
|
||||
export const systemPluginTemplateList: TGroupType[] = [
|
||||
{
|
||||
typeId: FlowNodeTemplateTypeEnum.tools,
|
||||
typeName: i18nT('app:tool_type_tools')
|
||||
},
|
||||
{
|
||||
typeId: FlowNodeTemplateTypeEnum.search,
|
||||
typeName: i18nT('app:tool_type_search')
|
||||
},
|
||||
{
|
||||
typeId: FlowNodeTemplateTypeEnum.multimodal,
|
||||
typeName: i18nT('app:tool_type_multimodal')
|
||||
},
|
||||
{
|
||||
typeId: FlowNodeTemplateTypeEnum.productivity,
|
||||
typeName: i18nT('app:tool_type_productivity')
|
||||
},
|
||||
{
|
||||
typeId: FlowNodeTemplateTypeEnum.scientific,
|
||||
typeName: i18nT('app:tool_type_scientific')
|
||||
},
|
||||
{
|
||||
typeId: FlowNodeTemplateTypeEnum.finance,
|
||||
typeName: i18nT('app:tool_type_finance')
|
||||
},
|
||||
{
|
||||
typeId: FlowNodeTemplateTypeEnum.design,
|
||||
typeName: i18nT('app:tool_type_design')
|
||||
},
|
||||
{
|
||||
typeId: FlowNodeTemplateTypeEnum.news,
|
||||
typeName: i18nT('app:tool_type_news')
|
||||
},
|
||||
{
|
||||
typeId: FlowNodeTemplateTypeEnum.entertainment,
|
||||
typeName: i18nT('app:tool_type_entertainment')
|
||||
},
|
||||
{
|
||||
typeId: FlowNodeTemplateTypeEnum.communication,
|
||||
typeName: i18nT('app:tool_type_communication')
|
||||
},
|
||||
{
|
||||
typeId: FlowNodeTemplateTypeEnum.social,
|
||||
typeName: i18nT('app:tool_type_social')
|
||||
},
|
||||
{
|
||||
typeId: FlowNodeTemplateTypeEnum.other,
|
||||
typeName: i18nT('common:Other')
|
||||
}
|
||||
];
|
||||
|
||||
export const workflowNodeTemplateList: {
|
||||
export const workflowSystemNodeTemplateList: {
|
||||
type: string;
|
||||
label: string;
|
||||
}[] = [
|
||||
|
|
@ -67,28 +16,27 @@ export const workflowNodeTemplateList: {
|
|||
type: FlowNodeTemplateTypeEnum.ai,
|
||||
label: i18nT('common:core.module.template.AI function')
|
||||
},
|
||||
|
||||
{
|
||||
type: FlowNodeTemplateTypeEnum.interactive,
|
||||
label: i18nT('common:core.workflow.template.Interactive')
|
||||
},
|
||||
|
||||
...systemPluginTemplateList.map((item) => ({
|
||||
type: item.typeId,
|
||||
label: item.typeName
|
||||
})),
|
||||
|
||||
{
|
||||
type: FlowNodeTemplateTypeEnum.teamApp,
|
||||
label: ''
|
||||
type: FlowNodeTemplateTypeEnum.tools,
|
||||
label: i18nT('app:tool_type_tools')
|
||||
},
|
||||
{
|
||||
type: FlowNodeTemplateTypeEnum.other,
|
||||
label: i18nT('common:Other')
|
||||
}
|
||||
];
|
||||
|
||||
export const defaultGroup: PluginGroupSchemaType = {
|
||||
export const defaultGroup: SystemToolGroupSchemaType = {
|
||||
groupId: 'systemPlugin',
|
||||
groupAvatar: 'core/app/type/pluginLight',
|
||||
groupName: i18nT('common:core.module.template.System Plugin'),
|
||||
groupOrder: 0,
|
||||
groupTypes: systemPluginTemplateList
|
||||
groupTypes: [] // from getPluginGroups
|
||||
};
|
||||
|
||||
export const defaultTemplateTypes: TemplateTypeSchemaType[] = [
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
"chat_debug": "Chat Preview",
|
||||
"chat_logs": "Logs",
|
||||
"chat_logs_tips": "Logs will record the online, shared, and API (requires chatId) conversation records of this app.",
|
||||
"common.day": "day",
|
||||
"config_ai_model_params": "Click to configure AI model related properties",
|
||||
"config_file_upload": "Click to Configure File Upload Rules",
|
||||
"config_question_guide": "Configuration guess you want to ask",
|
||||
|
|
@ -246,16 +247,14 @@
|
|||
"templateMarket.Search_template": "Search Template",
|
||||
"templateMarket.Use": "Use",
|
||||
"templateMarket.no_intro": "No introduction yet~",
|
||||
"templateMarket.templateTags.Image_generation": "Image Generation",
|
||||
"templateMarket.templateTags.Office_services": "Office Services",
|
||||
"templateMarket.templateTags.Recommendation": "Recommendation",
|
||||
"templateMarket.templateTags.Roleplay": "Roleplay",
|
||||
"templateMarket.templateTags.Web_search": "Web Search",
|
||||
"templateMarket.templateTags.Writing": "Writing",
|
||||
"templateMarket.template_guide": "Guide",
|
||||
"template_market": "Templates",
|
||||
"template_market_description": "Explore more features in the template market, with configuration tutorials and usage guides to help you understand and get started with various applications.",
|
||||
"template_market_empty_data": "No suitable templates found",
|
||||
"time_granularity": "Time granularity",
|
||||
"time_range_limit": "Time range limit",
|
||||
"time_type": "Time Type",
|
||||
"time_zone": "Time Zone",
|
||||
"too_to_active": "Active",
|
||||
"tool_active_manual_config_desc": "The temporary key is saved in this application and is only for use by this application.",
|
||||
|
|
@ -266,16 +265,6 @@
|
|||
"tool_input_param_tip": "This plugin requires configuration of related information to run properly.",
|
||||
"tool_not_active": "This tool has not been activated yet",
|
||||
"tool_run_free": "This tool runs without points consumption",
|
||||
"tool_type_communication": "Communication",
|
||||
"tool_type_design": "design",
|
||||
"tool_type_entertainment": "Business",
|
||||
"tool_type_finance": "finance",
|
||||
"tool_type_multimodal": "Multimodal",
|
||||
"tool_type_news": "news",
|
||||
"tool_type_productivity": "productive forces",
|
||||
"tool_type_scientific": "research",
|
||||
"tool_type_search": "Search",
|
||||
"tool_type_social": "Social",
|
||||
"tool_type_tools": "tool",
|
||||
"tools_no_description": "This tool has not been introduced ~",
|
||||
"transition_to_workflow": "Convert to Workflow",
|
||||
|
|
@ -313,7 +302,8 @@
|
|||
"un_auth": "No permission",
|
||||
"upload_file_max_amount": "Maximum File Quantity",
|
||||
"upload_file_max_amount_tip": "Maximum number of files uploaded in a single round of conversation",
|
||||
"variable.select type_desc": "You can define a global variable that does not need to be filled in by the user.\n\nThe value of this variable can come from the API interface, the Query of the shared link, or assigned through the [Variable Update] module.",
|
||||
"variable.internal_type_desc": "Use only inside the workflow and will not appear in the dialog box",
|
||||
"variable.select type_desc": "The input box will be displayed in the site conversation and run preview, and this variable will not be displayed in the sharing link.",
|
||||
"variable.textarea_type_desc": "Allows users to input up to 4000 characters in the dialogue box.",
|
||||
"variable_name_required": "Required variable name",
|
||||
"variable_repeat": "This variable name has been occupied and cannot be used",
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
"input_guide_tip": "You can set up some preset questions. When the user inputs a question, related questions from these presets will be suggested.",
|
||||
"input_placeholder_phone": "Please enter your question",
|
||||
"insert_input_guide,_some_data_already_exists": "Duplicate data detected, automatically filtered, {{len}} items inserted",
|
||||
"internal_variables_tip": "Internal variables are visible only when debugging",
|
||||
"invalid_share_url": "Invalid sharing link",
|
||||
"is_chatting": "Chatting in progress... please wait until it finishes",
|
||||
"items": "Items",
|
||||
|
|
@ -159,7 +160,7 @@
|
|||
"stream_output": "Stream Output",
|
||||
"unsupported_file_type": "Unsupported file types",
|
||||
"upload": "Upload",
|
||||
"variable_invisable_in_share": "Custom variables are not visible in login-free links",
|
||||
"variable_invisable_in_share": "External variables are not visible in login-free links",
|
||||
"view_citations": "View References",
|
||||
"web_site_sync": "Web Site Sync"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -601,6 +601,7 @@
|
|||
"core.module.Max Length": "Max Length",
|
||||
"core.module.Max Length placeholder": "Maximum length of input text",
|
||||
"core.module.Max Value": "Max Value",
|
||||
"core.module.Min Length": "Minimum number of digits",
|
||||
"core.module.Min Value": "Min Value",
|
||||
"core.module.QueryExtension.placeholder": "For example:\nQuestions about the introduction and use of Python.\nThe current conversation is related to the game 'GTA5'.",
|
||||
"core.module.Select app": "Select App",
|
||||
|
|
@ -727,10 +728,16 @@
|
|||
"core.workflow.inputType.Manual input": "Manual Input",
|
||||
"core.workflow.inputType.Manual select": "Manual Select",
|
||||
"core.workflow.inputType.Reference": "Variable Reference",
|
||||
"core.workflow.inputType.custom": "Custom Variable",
|
||||
"core.workflow.inputType.custom": "External Variable",
|
||||
"core.workflow.inputType.dynamicTargetInput": "Dynamic External Data",
|
||||
"core.workflow.inputType.file": "File upload",
|
||||
"core.workflow.inputType.input": "Single Line Input Box",
|
||||
"core.workflow.inputType.internal": "Internal variables",
|
||||
"core.workflow.inputType.jsonEditor": "JSON Editor",
|
||||
"core.workflow.inputType.modelSelect": "Dialogue Model Selection",
|
||||
"core.workflow.inputType.multipleSelect": "Multiple selection boxes",
|
||||
"core.workflow.inputType.number input": "Number Input Box",
|
||||
"core.workflow.inputType.password": "password",
|
||||
"core.workflow.inputType.select": "Single Select Box",
|
||||
"core.workflow.inputType.selectApp": "App Select",
|
||||
"core.workflow.inputType.selectDataset": "Dataset Select",
|
||||
|
|
@ -738,6 +745,8 @@
|
|||
"core.workflow.inputType.switch": "Switch",
|
||||
"core.workflow.inputType.textInput": "Text Input box",
|
||||
"core.workflow.inputType.textarea": "Multi-line Input Box",
|
||||
"core.workflow.inputType.timePointSelect": "Time point",
|
||||
"core.workflow.inputType.timeRangeSelect": "Time range",
|
||||
"core.workflow.publish.OnRevert version": "Click to Revert to This Version",
|
||||
"core.workflow.publish.OnRevert version confirm": "Confirm to Revert to This Version? The configuration of the editing version will be saved, and a new release version will be created for the reverted version.",
|
||||
"core.workflow.publish.histories": "Release Records",
|
||||
|
|
@ -802,6 +811,7 @@
|
|||
"date_1_month": "1 Month",
|
||||
"date_3_months": "3 Months",
|
||||
"date_6_months": "6 Months",
|
||||
"day": "Day",
|
||||
"deep_rag_search": "In-depth search",
|
||||
"delete_api": "Are you sure you want to delete this API key? \nAfter deletion, the key will become invalid immediately and the corresponding conversation log will not be deleted. Please confirm!",
|
||||
"delete_failed": "Deletion Failed",
|
||||
|
|
@ -844,6 +854,8 @@
|
|||
"had_auth_value": "Filled in",
|
||||
"has_verification": "Verified, Click to Unbind",
|
||||
"have_done": "Completed",
|
||||
"hour": "Hour",
|
||||
"hour_unit": "h",
|
||||
"import_failed": "Import Failed",
|
||||
"import_success": "Imported Successfully",
|
||||
"info.buy_extra": "Buy Extra Package",
|
||||
|
|
@ -881,8 +893,11 @@
|
|||
"max_quote_tokens_tips": "The maximum number of tokens in a single search, about 1 character in Chinese = 1.7 tokens, and about 1 character in English = 1 token",
|
||||
"mcp_server": "MCP Services",
|
||||
"member": "member",
|
||||
"min_length": "At least {{minLenth}} characters are required",
|
||||
"min_similarity": "lowest correlation",
|
||||
"min_similarity_tip": "The relevance of different index models is different. Please select the appropriate value through search testing. \nWhen using Result Rearrange , use the rearranged results for filtering.",
|
||||
"minute": "Minute",
|
||||
"minute_unit": "m",
|
||||
"model.billing": "Billing",
|
||||
"model.model_type": "Model type",
|
||||
"model.name": "Model name",
|
||||
|
|
@ -1007,6 +1022,8 @@
|
|||
"save_success": "Saved Successfully",
|
||||
"scan_code": "Scan the QR code to pay",
|
||||
"search_tool": "Search Tools",
|
||||
"second": "Second",
|
||||
"second_unit": "s",
|
||||
"secret_key": "Secret",
|
||||
"secret_tips": "The value will not return plaintext again after saving",
|
||||
"select_count_num": "{{num}} item selected",
|
||||
|
|
@ -1223,6 +1240,8 @@
|
|||
"templateTags.Writing": "Writing",
|
||||
"template_market": "Template Market",
|
||||
"textarea_variable_picker_tip": "Enter \"/\" to select a variable",
|
||||
"time_point": "Time point",
|
||||
"time_range": "Time period",
|
||||
"to_dataset": "To dataset",
|
||||
"total_num": "Total: {{num}}",
|
||||
"ui.textarea.Magnifying": "Magnifying",
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
"execute_a_simple_script_code_usually_for_complex_data_processing": "Execute a simple script code, usually for complex data processing.",
|
||||
"execute_different_branches_based_on_conditions": "Execute different branches based on conditions.",
|
||||
"execution_error": "Execution Error",
|
||||
"external_variables": "External variables",
|
||||
"extraction_requirements_description": "Extraction Requirements Description",
|
||||
"extraction_requirements_description_detail": "Provide AI with some background knowledge or requirements to guide it in completing the task better.\\nThis input box can use global variables.",
|
||||
"extraction_requirements_placeholder": "For example: 1. The current time is: {{cTime}}. \nYou are a laboratory reservation assistant. Your task is to help users make laboratory reservations and obtain the corresponding reservation information from the text.\n\n2. You are the Google Search Assistant and need to extract appropriate search terms from text.",
|
||||
|
|
@ -87,6 +88,7 @@
|
|||
"input_description": "Field Description",
|
||||
"input_type_multiple_select": "Multiple selection boxes",
|
||||
"input_variable_list": "Type / to invoke variable list",
|
||||
"internal_variables": "Internal variables",
|
||||
"intro_assigned_reply": "This module can directly reply with a specified content. Commonly used for guidance or prompts. Non-string content will be converted to string for output.",
|
||||
"intro_custom_feedback": "When this module is triggered, a feedback will be added to the current conversation record. It can be used to automatically record conversation effects, etc.",
|
||||
"intro_custom_plugin_output": "Custom configuration of external output. When using plugins, only the custom configured output is exposed.",
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
"chat_debug": "调试预览",
|
||||
"chat_logs": "对话日志",
|
||||
"chat_logs_tips": "日志会记录该应用的在线、分享和 API(需填写 chatId)对话记录",
|
||||
"common.day": "日",
|
||||
"config_ai_model_params": "点击配置 AI 模型相关属性",
|
||||
"config_file_upload": "点击配置文件上传规则",
|
||||
"config_question_guide": "配置猜你想问",
|
||||
|
|
@ -255,16 +256,16 @@
|
|||
"templateMarket.Search_template": "搜索模板",
|
||||
"templateMarket.Use": "使用",
|
||||
"templateMarket.no_intro": "还没有介绍~",
|
||||
"templateMarket.templateTags.Image_generation": "图片生成",
|
||||
"templateMarket.templateTags.Office_services": "办公服务",
|
||||
"templateMarket.templateTags.Recommendation": "推荐",
|
||||
"templateMarket.templateTags.Roleplay": "角色扮演",
|
||||
"templateMarket.templateTags.Web_search": "联网搜索",
|
||||
"templateMarket.templateTags.Writing": "文本创作",
|
||||
"templateMarket.template_guide": "模板说明",
|
||||
"template_market": "模板市场",
|
||||
"template_market_description": "在模板市场探索更多玩法,配置教程与使用引导,带你理解并上手各种应用",
|
||||
"template_market_empty_data": "找不到合适的模板",
|
||||
"time_granularity": "时间粒度",
|
||||
"time_range_end": "结束时间",
|
||||
"time_range_limit": "时间范围限制",
|
||||
"time_range_start": "开始时间",
|
||||
"time_type": "时间类型",
|
||||
"time_zone": "时区",
|
||||
"too_to_active": "去激活",
|
||||
"tool_active_manual_config_desc": "临时密钥保存在本应用中,仅供该应用使用",
|
||||
|
|
@ -275,16 +276,6 @@
|
|||
"tool_input_param_tip": "该插件正常运行需要配置相关信息",
|
||||
"tool_not_active": "该工具尚未激活",
|
||||
"tool_run_free": "该工具运行无积分消耗",
|
||||
"tool_type_communication": "通讯",
|
||||
"tool_type_design": "设计",
|
||||
"tool_type_entertainment": "商业",
|
||||
"tool_type_finance": "金融",
|
||||
"tool_type_multimodal": "多模态",
|
||||
"tool_type_news": "新闻",
|
||||
"tool_type_productivity": "生产力",
|
||||
"tool_type_scientific": "科研",
|
||||
"tool_type_search": "搜索",
|
||||
"tool_type_social": "社交",
|
||||
"tool_type_tools": "工具",
|
||||
"tools_no_description": "这个工具没有介绍~",
|
||||
"transition_to_workflow": "转成工作流",
|
||||
|
|
@ -322,7 +313,8 @@
|
|||
"un_auth": "无权限",
|
||||
"upload_file_max_amount": "最大文件数量",
|
||||
"upload_file_max_amount_tip": "单轮对话中最大上传文件数量",
|
||||
"variable.select type_desc": "可以为工作流定义全局变量,常用临时缓存。赋值的方式包括:\n1. 从对话页面的 query 参数获取。\n2. 通过 API 的 variables 对象传递。\n3. 通过【变量更新】节点进行赋值。",
|
||||
"variable.internal_type_desc": "仅在工作流内部使用,不会出现在对话框中",
|
||||
"variable.select type_desc": "会在站内对话和运行预览中显示输入框,在分享链接中不会显示此变量",
|
||||
"variable.textarea_type_desc": "允许用户最多输入4000字的对话框。",
|
||||
"variable_name_required": "变量名必填",
|
||||
"variable_repeat": "该变量名已被占用,无法使用",
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
"input_guide_tip": "可以配置一些预设的问题。在用户输入问题时,会从这些预设问题中获取相关问题进行提示。",
|
||||
"input_placeholder_phone": "输入问题",
|
||||
"insert_input_guide,_some_data_already_exists": "有重复数据,已自动过滤,共插入 {{len}} 条数据",
|
||||
"internal_variables_tip": "内部变量仅调试时可见",
|
||||
"invalid_share_url": "无效的分享链接",
|
||||
"is_chatting": "正在聊天中...请等待结束",
|
||||
"items": "条",
|
||||
|
|
@ -108,16 +109,16 @@
|
|||
"setting.favourite.categories_modal.delete_confirm_button": "删除",
|
||||
"setting.favourite.categories_modal.delete_confirm_title": "确认删除",
|
||||
"setting.favourite.categories_modal.title": "共 {{num}} 个分类",
|
||||
"setting.favourite.category_all": "全部分类",
|
||||
"setting.favourite.category_tab.all": "全部",
|
||||
"setting.favourite.category.no_data": "暂无可用精选应用",
|
||||
"setting.favourite.tag.no_data": "暂无分类",
|
||||
"setting.favourite.category_all": "全部分类",
|
||||
"setting.favourite.category_placeholder": "选择分类",
|
||||
"setting.favourite.category_tab.all": "全部",
|
||||
"setting.favourite.confirm_button": "确定",
|
||||
"setting.favourite.delete_app_cancel_button": "取消",
|
||||
"setting.favourite.delete_app_confirm": "确定要移除该精选应用吗?",
|
||||
"setting.favourite.delete_app_confirm_button": "确定",
|
||||
"setting.favourite.delete_app_title": "删除应用",
|
||||
"setting.favourite.goto_add": "去配置",
|
||||
"setting.favourite.manage_categories_button": "分类管理",
|
||||
"setting.favourite.save_category_for_app_button": "保存",
|
||||
"setting.favourite.search_placeholder": "搜索应用",
|
||||
|
|
@ -126,17 +127,21 @@
|
|||
"setting.favourite.table_column_category": "分类",
|
||||
"setting.favourite.table_column_intro": "介绍",
|
||||
"setting.favourite.table_column_name": "名称",
|
||||
"setting.favourite.tag.no_data": "暂无分类",
|
||||
"setting.favourite.title": "精选应用",
|
||||
"setting.favourite.goto_add": "去配置",
|
||||
"setting.home.available_tools": "可用工具",
|
||||
"setting.home.available_tools.add": "添加",
|
||||
"setting.home.cancel_button": "取消",
|
||||
"setting.home.commercial_version": "商业版",
|
||||
"setting.home.confirm_button": "确定",
|
||||
"setting.home.diagram": "示意图",
|
||||
"setting.home.dialogue_tips": "对话框提示文字",
|
||||
"setting.home.dialogue_tips.default": "你可以问我任何问题",
|
||||
"setting.home.dialogue_tips_placeholder": "请输入对话框提示文字",
|
||||
"setting.home.enable": "启用首页",
|
||||
"setting.home.home_tab_title": "首页标题",
|
||||
"setting.home.home_tab_title_placeholder": "请输入首页标题",
|
||||
"setting.home.no_selected_app": "未选择应用",
|
||||
"setting.home.quick_apps": "快捷应用",
|
||||
"setting.home.quick_apps.add": "配置快捷应用",
|
||||
"setting.home.quick_apps.placeholder": "请选择应用",
|
||||
|
|
@ -144,10 +149,6 @@
|
|||
"setting.home.slogan.default": "你好👋,我是 FastGPT ! 请问有什么可以帮你?",
|
||||
"setting.home.slogan_placeholder": "请输入 Slogan",
|
||||
"setting.home.title": "首页配置",
|
||||
"setting.home.cancel_button": "取消",
|
||||
"setting.home.confirm_button": "确定",
|
||||
"setting.home.no_selected_app": "未选择应用",
|
||||
"setting.home.enable": "启用首页",
|
||||
"setting.incorrect_plan": "当前套餐不支持该功能,请升级订阅套餐",
|
||||
"setting.incorrect_version": "当前版本不支持该功能",
|
||||
"setting.log_details.title": "首页日志",
|
||||
|
|
@ -162,7 +163,7 @@
|
|||
"stream_output": "流输出",
|
||||
"unsupported_file_type": "不支持的文件类型",
|
||||
"upload": "上传",
|
||||
"variable_invisable_in_share": "自定义变量在免登录链接中不可见",
|
||||
"variable_invisable_in_share": "外部变量在免登录链接中不可见",
|
||||
"view_citations": "查看引用",
|
||||
"web_site_sync": "Web站点同步"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -601,6 +601,7 @@
|
|||
"core.module.Max Length": "最大长度",
|
||||
"core.module.Max Length placeholder": "输入文本的最大长度",
|
||||
"core.module.Max Value": "最大值",
|
||||
"core.module.Min Length": "最小位数",
|
||||
"core.module.Min Value": "最小值",
|
||||
"core.module.QueryExtension.placeholder": "例如:\n关于 Python 的介绍和使用等问题。\n当前对话与游戏《GTA5》有关。",
|
||||
"core.module.Select app": "选择应用",
|
||||
|
|
@ -727,10 +728,17 @@
|
|||
"core.workflow.inputType.Manual input": "手动输入",
|
||||
"core.workflow.inputType.Manual select": "手动选择",
|
||||
"core.workflow.inputType.Reference": "变量引用",
|
||||
"core.workflow.inputType.custom": "自定义变量",
|
||||
"core.workflow.inputType.custom": "外部变量",
|
||||
"core.workflow.inputType.datasetSelect": "知识库选择",
|
||||
"core.workflow.inputType.dynamicTargetInput": "动态外部数据",
|
||||
"core.workflow.inputType.file": "文件上传",
|
||||
"core.workflow.inputType.input": "单行输入框",
|
||||
"core.workflow.inputType.internal": "内部变量",
|
||||
"core.workflow.inputType.jsonEditor": "JSON 输入框",
|
||||
"core.workflow.inputType.modelSelect": "对话模型选择",
|
||||
"core.workflow.inputType.multipleSelect": "多选框",
|
||||
"core.workflow.inputType.number input": "数字输入框",
|
||||
"core.workflow.inputType.password": "密码",
|
||||
"core.workflow.inputType.select": "单选框",
|
||||
"core.workflow.inputType.selectApp": "应用选择",
|
||||
"core.workflow.inputType.selectDataset": "知识库选择",
|
||||
|
|
@ -738,6 +746,8 @@
|
|||
"core.workflow.inputType.switch": "开关",
|
||||
"core.workflow.inputType.textInput": "文本输入框",
|
||||
"core.workflow.inputType.textarea": "多行输入框",
|
||||
"core.workflow.inputType.timePointSelect": "时间点",
|
||||
"core.workflow.inputType.timeRangeSelect": "时间范围",
|
||||
"core.workflow.publish.OnRevert version": "点击回退到该版本",
|
||||
"core.workflow.publish.OnRevert version confirm": "确认回退至该版本?会为您保存编辑中版本的配置,并为回退版本创建一个新的发布版本。",
|
||||
"core.workflow.publish.histories": "发布记录",
|
||||
|
|
@ -802,6 +812,7 @@
|
|||
"date_1_month": "1个月",
|
||||
"date_3_months": "3个月",
|
||||
"date_6_months": "6个月",
|
||||
"day": "日",
|
||||
"deep_rag_search": "深度搜索",
|
||||
"delete_api": "确认删除该API密钥?删除后该密钥立即失效,对应的对话日志不会删除,请确认!",
|
||||
"delete_failed": "删除失败",
|
||||
|
|
@ -844,6 +855,8 @@
|
|||
"had_auth_value": "已填写",
|
||||
"has_verification": "已验证,点击取消绑定",
|
||||
"have_done": "已完成",
|
||||
"hour": "小时",
|
||||
"hour_unit": "时",
|
||||
"import_failed": "导入失败",
|
||||
"import_success": "导入成功",
|
||||
"info.buy_extra": "购买额外套餐",
|
||||
|
|
@ -881,8 +894,11 @@
|
|||
"max_quote_tokens_tips": "单次搜索最大的 token 数量,中文约 1 字=1.7 tokens,英文约 1 字=1 token",
|
||||
"mcp_server": "MCP 服务",
|
||||
"member": "成员",
|
||||
"min_length": "最少需要 {{minLenth}} 个字符",
|
||||
"min_similarity": "最低相关度",
|
||||
"min_similarity_tip": "不同索引模型的相关度有区别,请通过搜索测试来选择合适的数值。使用 结果重排 时,使用重排结果进行过滤。",
|
||||
"minute": "分钟",
|
||||
"minute_unit": "分",
|
||||
"model.billing": "模型计费",
|
||||
"model.model_type": "模型类型",
|
||||
"model.name": "模型名",
|
||||
|
|
@ -1007,6 +1023,8 @@
|
|||
"save_success": "保存成功",
|
||||
"scan_code": "扫码支付",
|
||||
"search_tool": "搜索工具",
|
||||
"second": "秒",
|
||||
"second_unit": "秒",
|
||||
"secret_key": "密钥",
|
||||
"secret_tips": "值保存后不会再次明文返回",
|
||||
"select_count_num": "已选 {{num}} 项",
|
||||
|
|
@ -1224,6 +1242,8 @@
|
|||
"templateTags.Writing": "文本创作",
|
||||
"template_market": "模板市场",
|
||||
"textarea_variable_picker_tip": "输入\"/\"可选择变量",
|
||||
"time_point": "时间点",
|
||||
"time_range": "时间段",
|
||||
"to_dataset": "前往知识库",
|
||||
"total_num": "总数: {{num}}",
|
||||
"ui.textarea.Magnifying": "放大",
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
"execute_a_simple_script_code_usually_for_complex_data_processing": "执行一段简单的脚本代码,通常用于进行复杂的数据处理。",
|
||||
"execute_different_branches_based_on_conditions": "根据一定的条件,执行不同的分支。",
|
||||
"execution_error": "运行错误",
|
||||
"external_variables": "外部变量",
|
||||
"extraction_requirements_description": "提取要求描述",
|
||||
"extraction_requirements_description_detail": "给AI一些对应的背景知识或要求描述,引导AI更好的完成任务。\\n该输入框可使用全局变量。",
|
||||
"extraction_requirements_placeholder": "例如: 1. 当前时间为: {{cTime}}。你是一个实验室预约助手,你的任务是帮助用户预约实验室,从文本中获取对应的预约信息。\n2. 你是谷歌搜索助手,需要从文本中提取出合适的搜索词。",
|
||||
|
|
@ -87,6 +88,7 @@
|
|||
"input_description": "字段描述",
|
||||
"input_type_multiple_select": "多选框",
|
||||
"input_variable_list": "可输入 / 唤起变量列表",
|
||||
"internal_variables": "内部变量",
|
||||
"intro_assigned_reply": "该模块可以直接回复一段指定的内容。常用于引导、提示。非字符串内容传入时,会转成字符串进行输出。",
|
||||
"intro_custom_feedback": "该模块被触发时,会给当前的对话记录增加一条反馈。可用于自动记录对话效果等。",
|
||||
"intro_custom_plugin_output": "自定义配置外部输出,使用插件时,仅暴露自定义配置的输出",
|
||||
|
|
|
|||
|
|
@ -246,16 +246,14 @@
|
|||
"templateMarket.Search_template": "搜尋範本",
|
||||
"templateMarket.Use": "使用",
|
||||
"templateMarket.no_intro": "還沒有介紹~",
|
||||
"templateMarket.templateTags.Image_generation": "影像生成",
|
||||
"templateMarket.templateTags.Office_services": "辦公服務",
|
||||
"templateMarket.templateTags.Recommendation": "推薦",
|
||||
"templateMarket.templateTags.Roleplay": "角色扮演",
|
||||
"templateMarket.templateTags.Web_search": "網路搜尋",
|
||||
"templateMarket.templateTags.Writing": "文字創作",
|
||||
"templateMarket.template_guide": "範本說明",
|
||||
"template_market": "範本市集",
|
||||
"template_market_description": "在範本市集探索更多玩法,設定教學與使用指引,帶您理解並上手各種應用程式",
|
||||
"template_market_empty_data": "找不到合適的範本",
|
||||
"time_granularity": "時間粒度",
|
||||
"time_range_limit": "時間範圍限制",
|
||||
"time_type": "時間類型",
|
||||
"time_zone": "時區",
|
||||
"too_to_active": "去激活",
|
||||
"tool_active_manual_config_desc": "臨時密鑰保存在本應用中,僅供該應用使用",
|
||||
|
|
@ -266,16 +264,6 @@
|
|||
"tool_input_param_tip": "這個外掛正常執行需要設定相關資訊",
|
||||
"tool_not_active": "該工具尚未激活",
|
||||
"tool_run_free": "該工具運行無積分消耗",
|
||||
"tool_type_communication": "通訊",
|
||||
"tool_type_design": "設計",
|
||||
"tool_type_entertainment": "商業",
|
||||
"tool_type_finance": "金融",
|
||||
"tool_type_multimodal": "多模態",
|
||||
"tool_type_news": "新聞",
|
||||
"tool_type_productivity": "生產力",
|
||||
"tool_type_scientific": "科研",
|
||||
"tool_type_search": "搜尋",
|
||||
"tool_type_social": "社交",
|
||||
"tool_type_tools": "工具",
|
||||
"tools_no_description": "這個工具沒有介紹~",
|
||||
"transition_to_workflow": "轉換成工作流程",
|
||||
|
|
@ -313,7 +301,8 @@
|
|||
"un_auth": "無權限",
|
||||
"upload_file_max_amount": "最大檔案數量",
|
||||
"upload_file_max_amount_tip": "單輪對話中最大上傳檔案數量",
|
||||
"variable.select type_desc": "可以為工作流程定義全域變數,常用於暫存。賦值的方式包括:\n1. 從對話頁面的 query 參數取得。\n2. 透過 API 的 variables 物件傳遞。\n3. 透過【變數更新】節點進行賦值。",
|
||||
"variable.internal_type_desc": "僅在工作流內部使用,不會出現在對話框中",
|
||||
"variable.select type_desc": "會在站內對話和運行預覽中顯示輸入框,在分享鏈接中不會顯示此變量",
|
||||
"variable.textarea_type_desc": "允許使用者最多輸入 4000 字的對話框。",
|
||||
"variable_name_required": "變量名必填",
|
||||
"variable_repeat": "該變量名已被佔用,無法使用",
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
"input_guide_tip": "您可以設定一些預設問題。當使用者輸入問題時,系統會從這些預設問題中提供相關問題作為提示。",
|
||||
"input_placeholder_phone": "請輸入問題",
|
||||
"insert_input_guide,_some_data_already_exists": "偵測到重複資料,已自動過濾,共插入 {{len}} 筆資料",
|
||||
"internal_variables_tip": "內部變量僅調試時可見",
|
||||
"invalid_share_url": "無效的分享鏈接",
|
||||
"is_chatting": "對話進行中...請稍候",
|
||||
"items": "筆",
|
||||
|
|
@ -159,7 +160,7 @@
|
|||
"stream_output": "串流輸出",
|
||||
"unsupported_file_type": "不支援的檔案類型",
|
||||
"upload": "上傳",
|
||||
"variable_invisable_in_share": "自定義變數在免登入連結中不可見",
|
||||
"variable_invisable_in_share": "外部變量在免登錄鏈接中不可見",
|
||||
"view_citations": "檢視引用",
|
||||
"web_site_sync": "網站同步"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -600,6 +600,7 @@
|
|||
"core.module.Max Length": "最大長度",
|
||||
"core.module.Max Length placeholder": "輸入文字的最大長度",
|
||||
"core.module.Max Value": "最大值",
|
||||
"core.module.Min Length": "最小位數",
|
||||
"core.module.Min Value": "最小值",
|
||||
"core.module.QueryExtension.placeholder": "例如:\n關於 Python 的介紹和使用等問題。\n目前對話與遊戲《GTA5》有關。",
|
||||
"core.module.Select app": "選擇應用程式",
|
||||
|
|
@ -726,10 +727,16 @@
|
|||
"core.workflow.inputType.Manual input": "手動輸入",
|
||||
"core.workflow.inputType.Manual select": "手動選擇",
|
||||
"core.workflow.inputType.Reference": "變數引用",
|
||||
"core.workflow.inputType.custom": "自訂變數",
|
||||
"core.workflow.inputType.custom": "外部變數",
|
||||
"core.workflow.inputType.dynamicTargetInput": "動態外部資料",
|
||||
"core.workflow.inputType.file": "文件上傳",
|
||||
"core.workflow.inputType.input": "單行輸入框",
|
||||
"core.workflow.inputType.internal": "內部變量",
|
||||
"core.workflow.inputType.jsonEditor": "JSON 輸入框",
|
||||
"core.workflow.inputType.modelSelect": "對話模型選擇",
|
||||
"core.workflow.inputType.multipleSelect": "多選框",
|
||||
"core.workflow.inputType.number input": "數字輸入框",
|
||||
"core.workflow.inputType.password": "密碼",
|
||||
"core.workflow.inputType.select": "單選框",
|
||||
"core.workflow.inputType.selectApp": "應用程式選擇",
|
||||
"core.workflow.inputType.selectDataset": "知識庫選擇",
|
||||
|
|
@ -737,6 +744,8 @@
|
|||
"core.workflow.inputType.switch": "開關",
|
||||
"core.workflow.inputType.textInput": "文字輸入框",
|
||||
"core.workflow.inputType.textarea": "多行輸入框",
|
||||
"core.workflow.inputType.timePointSelect": "時間點",
|
||||
"core.workflow.inputType.timeRangeSelect": "時間範圍",
|
||||
"core.workflow.publish.OnRevert version": "點選回復至此版本",
|
||||
"core.workflow.publish.OnRevert version confirm": "確認回復至此版本?將為您儲存編輯中版本的設定,並為回復版本建立一個新的發布版本。",
|
||||
"core.workflow.publish.histories": "發布記錄",
|
||||
|
|
@ -801,6 +810,7 @@
|
|||
"date_1_month": "1個月",
|
||||
"date_3 months": "3個月",
|
||||
"date_6_months": "6個月",
|
||||
"day": "日",
|
||||
"deep_rag_search": "深度搜尋",
|
||||
"delete_api": "確認刪除此 API 金鑰?\n刪除後該金鑰將立即失效,對應的對話記錄不會被刪除,請確認!",
|
||||
"delete_failed": "刪除失敗",
|
||||
|
|
@ -843,6 +853,8 @@
|
|||
"had_auth_value": "已填寫",
|
||||
"has_verification": "已驗證,點選解除綁定",
|
||||
"have_done": "已完成",
|
||||
"hour": "小時",
|
||||
"hour_unit": "時",
|
||||
"import_failed": "匯入失敗",
|
||||
"import_success": "匯入成功",
|
||||
"info.buy_extra": "購買額外方案",
|
||||
|
|
@ -880,8 +892,11 @@
|
|||
"max_quote_tokens_tips": "單次搜尋最大的 token 數量,中文約 1 字=1.7 tokens,英文約 1 字=1 token",
|
||||
"mcp_server": "MCP 服務",
|
||||
"member": "成員",
|
||||
"min_length": "最少需要 {{minLenth}} 個字符",
|
||||
"min_similarity": "最低相關度",
|
||||
"min_similarity_tip": "不同索引模型的相關度有區別,請透過搜尋測試來選擇合適的數值。\n使用 結果重排 時,使用重排結果過濾。",
|
||||
"minute": "分鐘",
|
||||
"minute_unit": "分",
|
||||
"model.billing": "模型計費",
|
||||
"model.model_type": "模型類型",
|
||||
"model.name": "模型名",
|
||||
|
|
@ -1006,6 +1021,8 @@
|
|||
"save_success": "儲存成功",
|
||||
"scan_code": "掃碼支付",
|
||||
"search_tool": "搜索工具",
|
||||
"second": "秒",
|
||||
"second_unit": "秒",
|
||||
"secret_key": "密鑰",
|
||||
"secret_tips": "值保存後不會再次明文返回",
|
||||
"select_count_num": "已選 {{num}} 項",
|
||||
|
|
@ -1222,6 +1239,8 @@
|
|||
"templateTags.Writing": "文字創作",
|
||||
"template_market": "模板市場",
|
||||
"textarea_variable_picker_tip": "輸入「/」以選擇變數",
|
||||
"time_point": "時間點",
|
||||
"time_range": "時間段",
|
||||
"to_dataset": "前往知識庫",
|
||||
"total_num": "總數: {{num}}",
|
||||
"ui.textarea.Magnifying": "放大",
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
"execute_a_simple_script_code_usually_for_complex_data_processing": "執行一段簡單的腳本程式碼,通常用於複雜的資料處理。",
|
||||
"execute_different_branches_based_on_conditions": "根據條件執行不同的分支。",
|
||||
"execution_error": "執行錯誤",
|
||||
"external_variables": "外部變量",
|
||||
"extraction_requirements_description": "擷取需求描述",
|
||||
"extraction_requirements_description_detail": "提供 AI 相對應的背景知識或需求描述,引導 AI 更好地完成任務。\\n這個輸入框可以使用全域變數。",
|
||||
"extraction_requirements_placeholder": "例如:1. 目前時間為:{{cTime}}。\n你是實驗室預約助手,你的任務是幫助使用者預約實驗室,從文字中取得對應的預約資訊。\n\n2. 你是 Google 搜尋助手,需要從文字中提取出合適的搜尋字詞。",
|
||||
|
|
@ -87,6 +88,7 @@
|
|||
"input_description": "欄位描述",
|
||||
"input_type_multiple_select": "多選框",
|
||||
"input_variable_list": "輸入 / 叫出變數清單",
|
||||
"internal_variables": "內部變量",
|
||||
"intro_assigned_reply": "這個模組可以直接回覆指定的內容。常用於引導、提示。非字串內容傳入時,會轉換成字串輸出。",
|
||||
"intro_custom_feedback": "當這個模組被觸發時,會在目前的對話紀錄中新增一條回饋。可以用於自動記錄對話效果等等。",
|
||||
"intro_custom_plugin_output": "自訂設定外部輸出,使用外掛程式時,只顯示自訂設定的輸出",
|
||||
|
|
|
|||
|
|
@ -12,7 +12,11 @@
|
|||
"@emotion/styled": "11.11.0",
|
||||
"@fastgpt/global": "workspace:*",
|
||||
"@fingerprintjs/fingerprintjs": "^4.3.0",
|
||||
"@lexical/code": "0.12.6",
|
||||
"@lexical/list": "0.12.6",
|
||||
"@lexical/markdown": "0.12.6",
|
||||
"@lexical/react": "0.12.6",
|
||||
"@lexical/rich-text": "0.12.6",
|
||||
"@lexical/selection": "^0.14.5",
|
||||
"@lexical/text": "0.12.6",
|
||||
"@lexical/utils": "0.12.6",
|
||||
|
|
@ -21,7 +25,6 @@
|
|||
"ahooks": "^3.9.4",
|
||||
"date-fns": "2.30.0",
|
||||
"dayjs": "^1.11.7",
|
||||
"recharts": "^2.15.0",
|
||||
"i18next": "23.16.8",
|
||||
"js-cookie": "^3.0.5",
|
||||
"lexical": "0.12.6",
|
||||
|
|
@ -35,6 +38,7 @@
|
|||
"react-hook-form": "7.43.1",
|
||||
"react-i18next": "14.1.2",
|
||||
"react-photo-view": "^1.2.6",
|
||||
"recharts": "^2.15.0",
|
||||
"use-context-selector": "^1.4.4",
|
||||
"zustand": "^4.3.5"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ importers:
|
|||
specifier: ^1.2.8
|
||||
version: 1.2.8
|
||||
'@fastgpt-sdk/plugin':
|
||||
specifier: ^0.1.12
|
||||
version: 0.1.12(@types/node@20.14.0)
|
||||
specifier: ^0.1.16
|
||||
version: 0.1.16(@types/node@20.14.0)
|
||||
axios:
|
||||
specifier: ^1.8.2
|
||||
version: 1.8.4
|
||||
|
|
@ -308,15 +308,6 @@ importers:
|
|||
specifier: ^5.0.4
|
||||
version: 5.0.5
|
||||
|
||||
packages/templates:
|
||||
devDependencies:
|
||||
'@fastgpt/global':
|
||||
specifier: workspace:*
|
||||
version: link:../global
|
||||
'@fastgpt/service':
|
||||
specifier: workspace:*
|
||||
version: link:../service
|
||||
|
||||
packages/web:
|
||||
dependencies:
|
||||
'@chakra-ui/anatomy':
|
||||
|
|
@ -349,9 +340,21 @@ importers:
|
|||
'@fingerprintjs/fingerprintjs':
|
||||
specifier: ^4.3.0
|
||||
version: 4.6.1
|
||||
'@lexical/code':
|
||||
specifier: 0.12.6
|
||||
version: 0.12.6(lexical@0.12.6)
|
||||
'@lexical/list':
|
||||
specifier: 0.12.6
|
||||
version: 0.12.6(lexical@0.12.6)
|
||||
'@lexical/markdown':
|
||||
specifier: 0.12.6
|
||||
version: 0.12.6(@lexical/clipboard@0.12.6(lexical@0.12.6))(@lexical/selection@0.14.5)(lexical@0.12.6)
|
||||
'@lexical/react':
|
||||
specifier: 0.12.6
|
||||
version: 0.12.6(lexical@0.12.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(yjs@13.6.24)
|
||||
'@lexical/rich-text':
|
||||
specifier: 0.12.6
|
||||
version: 0.12.6(@lexical/clipboard@0.12.6(lexical@0.12.6))(@lexical/selection@0.14.5)(@lexical/utils@0.12.6(lexical@0.12.6))(lexical@0.12.6)
|
||||
'@lexical/selection':
|
||||
specifier: ^0.14.5
|
||||
version: 0.14.5
|
||||
|
|
@ -479,9 +482,6 @@ importers:
|
|||
'@fastgpt/service':
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/service
|
||||
'@fastgpt/templates':
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/templates
|
||||
'@fastgpt/web':
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/web
|
||||
|
|
@ -1976,8 +1976,8 @@ packages:
|
|||
resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
|
||||
'@fastgpt-sdk/plugin@0.1.12':
|
||||
resolution: {integrity: sha512-jcgS0FWNxtfdwq+M7VEK4NggkIIXDkSC7jukYjRkEPS1klupkS89O3D0ekAZHq7uzHUbEN18x0xui+nV3nh0Tw==}
|
||||
'@fastgpt-sdk/plugin@0.1.16':
|
||||
resolution: {integrity: sha512-HGoq0jy3YrY8RAJvn8b0u13uqOjjNe5OE4w2dySQc4dgUjHpsmMl9hfGzAhi9bpuUrtptpGohtf0ealNeAAfDQ==}
|
||||
|
||||
'@fastify/accept-negotiator@1.1.0':
|
||||
resolution: {integrity: sha512-OIHZrb2ImZ7XG85HXOONLcJWGosv7sIvM2ifAPQVhg9Lv7qdmMBNVaai4QTdyuaqbKM5eO6sLSQOYI7wEQeCJQ==}
|
||||
|
|
@ -11222,7 +11222,7 @@ snapshots:
|
|||
|
||||
'@eslint/js@8.57.1': {}
|
||||
|
||||
'@fastgpt-sdk/plugin@0.1.12(@types/node@20.14.0)':
|
||||
'@fastgpt-sdk/plugin@0.1.16(@types/node@20.14.0)':
|
||||
dependencies:
|
||||
'@fortaine/fetch-event-source': 3.0.6
|
||||
'@ts-rest/core': 3.52.1(@types/node@20.14.0)(zod@3.25.51)
|
||||
|
|
@ -11604,6 +11604,19 @@ snapshots:
|
|||
- '@lexical/clipboard'
|
||||
- '@lexical/selection'
|
||||
|
||||
'@lexical/markdown@0.12.6(@lexical/clipboard@0.12.6(lexical@0.12.6))(@lexical/selection@0.14.5)(lexical@0.12.6)':
|
||||
dependencies:
|
||||
'@lexical/code': 0.12.6(lexical@0.12.6)
|
||||
'@lexical/link': 0.12.6(lexical@0.12.6)
|
||||
'@lexical/list': 0.12.6(lexical@0.12.6)
|
||||
'@lexical/rich-text': 0.12.6(@lexical/clipboard@0.12.6(lexical@0.12.6))(@lexical/selection@0.14.5)(@lexical/utils@0.12.6(lexical@0.12.6))(lexical@0.12.6)
|
||||
'@lexical/text': 0.12.6(lexical@0.12.6)
|
||||
'@lexical/utils': 0.12.6(lexical@0.12.6)
|
||||
lexical: 0.12.6
|
||||
transitivePeerDependencies:
|
||||
- '@lexical/clipboard'
|
||||
- '@lexical/selection'
|
||||
|
||||
'@lexical/offset@0.12.6(lexical@0.12.6)':
|
||||
dependencies:
|
||||
lexical: 0.12.6
|
||||
|
|
@ -11652,6 +11665,13 @@ snapshots:
|
|||
'@lexical/utils': 0.12.6(lexical@0.12.6)
|
||||
lexical: 0.12.6
|
||||
|
||||
'@lexical/rich-text@0.12.6(@lexical/clipboard@0.12.6(lexical@0.12.6))(@lexical/selection@0.14.5)(@lexical/utils@0.12.6(lexical@0.12.6))(lexical@0.12.6)':
|
||||
dependencies:
|
||||
'@lexical/clipboard': 0.12.6(lexical@0.12.6)
|
||||
'@lexical/selection': 0.14.5
|
||||
'@lexical/utils': 0.12.6(lexical@0.12.6)
|
||||
lexical: 0.12.6
|
||||
|
||||
'@lexical/selection@0.12.6(lexical@0.12.6)':
|
||||
dependencies:
|
||||
lexical: 0.12.6
|
||||
|
|
@ -15126,7 +15146,7 @@ snapshots:
|
|||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-module-utils@2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.9.0(eslint-plugin-import@2.31.0)(eslint@8.56.0))(eslint@8.56.0):
|
||||
eslint-module-utils@2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.9.0)(eslint@8.56.0):
|
||||
dependencies:
|
||||
debug: 3.2.7
|
||||
optionalDependencies:
|
||||
|
|
@ -15137,7 +15157,7 @@ snapshots:
|
|||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-module-utils@2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.9.0(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1):
|
||||
eslint-module-utils@2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.9.0)(eslint@8.57.1):
|
||||
dependencies:
|
||||
debug: 3.2.7
|
||||
optionalDependencies:
|
||||
|
|
@ -15159,7 +15179,7 @@ snapshots:
|
|||
doctrine: 2.1.0
|
||||
eslint: 8.56.0
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.9.0(eslint-plugin-import@2.31.0)(eslint@8.56.0))(eslint@8.56.0)
|
||||
eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.9.0)(eslint@8.56.0)
|
||||
hasown: 2.0.2
|
||||
is-core-module: 2.16.1
|
||||
is-glob: 4.0.3
|
||||
|
|
@ -15188,7 +15208,7 @@ snapshots:
|
|||
doctrine: 2.1.0
|
||||
eslint: 8.57.1
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.9.0(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1)
|
||||
eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.9.0)(eslint@8.57.1)
|
||||
hasown: 2.0.2
|
||||
is-core-module: 2.16.1
|
||||
is-glob: 4.0.3
|
||||
|
|
|
|||