mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
4.8.6 merge (#1943)
* Dataset collection forbid (#1885) * perf: tool call support same id * feat: collection forbid * feat: collection forbid * Inheritance Permission for apps (#1897) * feat: app schema define chore: references of authapp * feat: authApp method inheritance * feat: create and update api * feat: update * feat: inheritance Permission controller for app. * feat: abstract version of inheritPermission * feat: ancestorId for apps * chore: update app * fix: inheritPermission abstract version * feat: update folder defaultPermission * feat: app update api * chore: inheritance frontend * chore: app list api * feat: update defaultPermission in app deatil * feat: backend api finished * feat: app inheritance permission fe * fix: app update defaultpermission causes collaborator miss * fix: ts error * chore: adjust the codes * chore: i18n chore: i18n * chore: fe adjust and i18n * chore: adjust the code * feat: resume api; chore: rewrite update api and inheritPermission methods * chore: something * chore: fe code adjusting * feat: frontend adjusting * chore: fe code adjusting * chore: adjusting the code * perf: fe loading * format * Inheritance fix (#1908) * fix: SlideCard * fix: authapp did not return parent app for inheritance app * fix: fe adjusting * feat: fe adjusing * perf: inherit per ux * doc * fix: ts errors (#1916) * perf: inherit permission * fix: permission inherit * Workflow type (#1938) * perf: workflow type tmp workflow perf: workflow type feat: custom field config * perf: dynamic input * perf: node classify * perf: node classify * perf: node classify * perf: node classify * fix: workflow custom input * feat: text editor and customFeedback move to basic nodes * feat: community system plugin * fix: ts * feat: exprEval plugin * perf: workflow type * perf: plugin important * fix: default templates * perf: markdown hr css * lock * perf: fetch url * perf: new plugin version * fix: chat histories update * fix: collection paths invalid * perf: app card ui --------- Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
## 插件类型
|
||||
|
||||
xxx.json 文件
|
||||
|
||||
```ts
|
||||
type TemplateType =
|
||||
| 'userGuide'
|
||||
| 'systemInput'
|
||||
| 'tools'
|
||||
| 'textAnswer'
|
||||
| 'functionCall'
|
||||
| 'externalCall'
|
||||
| 'other';
|
||||
|
||||
type pluginType = {
|
||||
author: string; // 填写作者信息
|
||||
templateType: FlowNodeTemplateType['templateType'];
|
||||
name: string;
|
||||
avatar: string;
|
||||
intro: string;
|
||||
showStatus?: boolean; // 是否需要展示组件运行状态
|
||||
modules: []; //直接从高级编排导出配置复制过来;
|
||||
};
|
||||
```
|
||||
|
||||
## 额外代码怎么写?
|
||||
|
||||
参考 `TFSwitch` 和 `TextEditor`,通过 HTTP 模块将数据转到一个接口中实现。提交到社区的插件,务必将所有代码都放置在 FastGPT 仓库中,可以在 `projects/app/src/pages/api/plugins` 下新建一个与**插件文件名相同**的子目录进行接口编辑。
|
||||
|
||||
## 需要装包怎么办?
|
||||
|
||||
可以在 `packages/plugins` 下创建一个与**插件文件名相同**的子目录进行编写,可在 plugins 目录下安装相关依赖。然后在 FastGPT 主项目的接口中通过 `@fastgpt/plugins/xxx` 引入。
|
@@ -8,227 +8,295 @@
|
||||
"showStatus": false,
|
||||
"isTool": false,
|
||||
"weight": 0,
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "lmpb9v2lo2lk",
|
||||
"name": "自定义插件输入",
|
||||
"intro": "自定义配置外部输入,使用插件时,仅暴露自定义配置的输入",
|
||||
"avatar": "/imgs/workflow/input.png",
|
||||
"flowNodeType": "pluginInput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 616.4226348688949,
|
||||
"y": -165.05298493910115
|
||||
},
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"valueType": "dynamic",
|
||||
"label": "动态外部数据",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"required": false,
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"value": "",
|
||||
"editField": {
|
||||
"key": true
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "lmpb9v2lo2lk",
|
||||
"name": "自定义插件输入",
|
||||
"intro": "自定义配置外部输入,使用插件时,仅暴露自定义配置的输入",
|
||||
"avatar": "/imgs/workflow/input.png",
|
||||
"flowNodeType": "pluginInput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 541.7107154264237,
|
||||
"y": -165.05298493910115
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"valueType": "dynamic",
|
||||
"label": "自定义输入变量",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"required": false,
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"value": "",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": ["string"],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": false
|
||||
}
|
||||
},
|
||||
"dynamicParamDefaultValue": {
|
||||
"inputType": "reference",
|
||||
{
|
||||
"key": "反馈内容",
|
||||
"valueType": "string",
|
||||
"required": true
|
||||
"label": "反馈内容",
|
||||
"renderTypeList": ["textarea", "reference"],
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"value": "",
|
||||
"maxLength": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "反馈内容",
|
||||
"valueType": "string",
|
||||
"label": "反馈内容",
|
||||
"renderTypeList": ["textarea"],
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"value": "",
|
||||
"editField": {
|
||||
"key": true
|
||||
},
|
||||
"maxLength": "",
|
||||
"dynamicParamDefaultValue": {
|
||||
"inputType": "reference",
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "ILc8GS7iU53M",
|
||||
"key": "反馈内容",
|
||||
"valueType": "string",
|
||||
"label": "反馈内容",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "2LCxDnOSculb",
|
||||
"key": "system_addInputParam",
|
||||
"valueType": "dynamic",
|
||||
"label": "动态外部数据",
|
||||
"type": "static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "i7uow4wj2wdp",
|
||||
"name": "自定义插件输出",
|
||||
"intro": "自定义配置外部输出,使用插件时,仅暴露自定义配置的输出",
|
||||
"avatar": "/imgs/workflow/output.png",
|
||||
"flowNodeType": "pluginOutput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 1607.7142331269126,
|
||||
"y": -151.8669210746189
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text",
|
||||
"renderTypeList": ["reference"],
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"description": true,
|
||||
"valueType": true
|
||||
},
|
||||
"value": ["CRT7oIEU8v2P", "pYKS0LB9gAr3"]
|
||||
}
|
||||
],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "CRT7oIEU8v2P",
|
||||
"name": "HTTP 请求",
|
||||
"intro": "可以发出一个 HTTP 请求,实现更为复杂的操作(联网搜索、数据库查询等)",
|
||||
"avatar": "/imgs/workflow/http.png",
|
||||
"flowNodeType": "httpRequest468",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1070.8458389994719,
|
||||
"y": -415.09022555407836
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "core.module.input.description.HTTP Dynamic Input",
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
},
|
||||
"value": ["lmpb9v2lo2lk", "2LCxDnOSculb"],
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "system_httpMethod",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"value": "POST",
|
||||
"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": "/api/plugins/customFeedback/v2"
|
||||
},
|
||||
{
|
||||
"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": [],
|
||||
"label": "",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "system_httpJsonBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": "{\r\n \"customFeedback\":\"{{customFeedback}}\",\r\n \"customInputs\": {{customInputs}},\r\n \"appId\": \"{{appId}}\",\r\n \"chatId\": \"{{chatId}}\",\r\n \"responseChatItemId\": \"{{responseChatItemId}}\"\r\n}",
|
||||
"label": "",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "customFeedback",
|
||||
"valueType": "string",
|
||||
"label": "customFeedback",
|
||||
"renderTypeList": ["reference"],
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
},
|
||||
"value": ["lmpb9v2lo2lk", "ILc8GS7iU53M"]
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"valueType": "dynamic",
|
||||
"canEdit": true,
|
||||
"key": "customInputs",
|
||||
"label": "customInputs",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"required": true,
|
||||
"value": ["lmpb9v2lo2lk", "2LCxDnOSculb"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "ILc8GS7iU53M",
|
||||
"key": "反馈内容",
|
||||
"valueType": "string",
|
||||
"label": "反馈内容",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "2LCxDnOSculb",
|
||||
"key": "system_addInputParam",
|
||||
"valueType": "dynamic",
|
||||
"label": "动态外部数据",
|
||||
"type": "static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "i7uow4wj2wdp",
|
||||
"name": "自定义插件输出",
|
||||
"intro": "自定义配置外部输出,使用插件时,仅暴露自定义配置的输出",
|
||||
"avatar": "/imgs/workflow/output.png",
|
||||
"flowNodeType": "pluginOutput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 1607.7142331269126,
|
||||
"y": -151.8669210746189
|
||||
},
|
||||
"inputs": [
|
||||
{
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text",
|
||||
"renderTypeList": ["reference"],
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"description": true,
|
||||
"valueType": true
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"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": true
|
||||
}
|
||||
},
|
||||
"value": ["CRT7oIEU8v2P", "pYKS0LB9gAr3"]
|
||||
}
|
||||
],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "CRT7oIEU8v2P",
|
||||
"name": "HTTP 请求",
|
||||
"intro": "可以发出一个 HTTP 请求,实现更为复杂的操作(联网搜索、数据库查询等)",
|
||||
"avatar": "/imgs/workflow/http.png",
|
||||
"flowNodeType": "httpRequest468",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1070.8458389994719,
|
||||
"y": -415.09022555407836
|
||||
},
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "core.module.input.description.HTTP Dynamic Input",
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
{
|
||||
"id": "error",
|
||||
"key": "error",
|
||||
"label": "请求错误",
|
||||
"description": "HTTP请求错误信息,成功时返回空",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
"value": ["lmpb9v2lo2lk", "2LCxDnOSculb"]
|
||||
},
|
||||
{
|
||||
"key": "customFeedback",
|
||||
"valueType": "string",
|
||||
"label": "customFeedback",
|
||||
"renderTypeList": ["reference"],
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
{
|
||||
"id": "httpRawResponse",
|
||||
"key": "httpRawResponse",
|
||||
"label": "原始响应",
|
||||
"required": true,
|
||||
"description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
|
||||
"valueType": "any",
|
||||
"type": "static"
|
||||
},
|
||||
"value": ["lmpb9v2lo2lk", "ILc8GS7iU53M"]
|
||||
},
|
||||
{
|
||||
"key": "system_httpMethod",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"value": "POST",
|
||||
"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": "/api/plugins/customFeedback/v2"
|
||||
},
|
||||
{
|
||||
"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": [],
|
||||
"label": "",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "system_httpJsonBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": "{\r\n \"customFeedback\":\"{{customFeedback}}\",\r\n \"system_addInputParam\": {{system_addInputParam}}\r\n}",
|
||||
"label": "",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
{
|
||||
"id": "pYKS0LB9gAr3",
|
||||
"type": "dynamic",
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "httpRawResponse",
|
||||
"key": "httpRawResponse",
|
||||
"label": "原始响应",
|
||||
"description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
|
||||
"valueType": "any",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "pYKS0LB9gAr3",
|
||||
"type": "dynamic",
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "lmpb9v2lo2lk",
|
||||
"target": "CRT7oIEU8v2P",
|
||||
"sourceHandle": "lmpb9v2lo2lk-source-right",
|
||||
"targetHandle": "CRT7oIEU8v2P-target-left"
|
||||
},
|
||||
{
|
||||
"source": "CRT7oIEU8v2P",
|
||||
"target": "i7uow4wj2wdp",
|
||||
"sourceHandle": "CRT7oIEU8v2P-source-right",
|
||||
"targetHandle": "i7uow4wj2wdp-target-left"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "lmpb9v2lo2lk",
|
||||
"target": "CRT7oIEU8v2P",
|
||||
"sourceHandle": "lmpb9v2lo2lk-source-right",
|
||||
"targetHandle": "CRT7oIEU8v2P-target-left"
|
||||
},
|
||||
{
|
||||
"source": "CRT7oIEU8v2P",
|
||||
"target": "i7uow4wj2wdp",
|
||||
"sourceHandle": "CRT7oIEU8v2P-source-right",
|
||||
"targetHandle": "i7uow4wj2wdp-target-left"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@@ -8,125 +8,127 @@
|
||||
"showStatus": false,
|
||||
"isTool": true,
|
||||
"weight": 10,
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "lmpb9v2lo2lk",
|
||||
"name": "自定义插件输入",
|
||||
"intro": "自定义配置外部输入,使用插件时,仅暴露自定义配置的输入",
|
||||
"avatar": "/imgs/workflow/input.png",
|
||||
"flowNodeType": "pluginInput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 616.4226348688949,
|
||||
"y": -165.05298493910115
|
||||
},
|
||||
"inputs": [],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "i7uow4wj2wdp",
|
||||
"name": "自定义插件输出",
|
||||
"intro": "自定义配置外部输出,使用插件时,仅暴露自定义配置的输出",
|
||||
"avatar": "/imgs/workflow/output.png",
|
||||
"flowNodeType": "pluginOutput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 1607.7142331269126,
|
||||
"y": -151.8669210746189
|
||||
},
|
||||
"inputs": [
|
||||
{
|
||||
"key": "time",
|
||||
"valueType": "string",
|
||||
"label": "time",
|
||||
"renderTypeList": ["reference"],
|
||||
"required": false,
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"description": true,
|
||||
"valueType": true
|
||||
},
|
||||
"value": ["WNUvWwYBUfEr", "HdIl1GWi0tnc"]
|
||||
}
|
||||
],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "WNUvWwYBUfEr",
|
||||
"name": "文本加工",
|
||||
"intro": "可对固定或传入的文本进行加工后输出,非字符串类型数据最终会转成字符串类型。",
|
||||
"flowNodeType": "pluginModule",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 1030.0794269310472,
|
||||
"y": -350.61013802286885
|
||||
},
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"valueType": "dynamic",
|
||||
"label": "动态外部数据",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"required": false,
|
||||
"description": "",
|
||||
"canEdit": false,
|
||||
"value": "",
|
||||
"editField": {
|
||||
"key": true
|
||||
},
|
||||
"dynamicParamDefaultValue": {
|
||||
"inputType": "reference",
|
||||
"valueType": "string",
|
||||
"required": true
|
||||
}
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "lmpb9v2lo2lk",
|
||||
"name": "自定义插件输入",
|
||||
"intro": "自定义配置外部输入,使用插件时,仅暴露自定义配置的输入",
|
||||
"avatar": "/imgs/workflow/input.png",
|
||||
"flowNodeType": "pluginInput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 616.4226348688949,
|
||||
"y": -165.05298493910115
|
||||
},
|
||||
{
|
||||
"key": "文本",
|
||||
"valueType": "string",
|
||||
"label": "文本",
|
||||
"renderTypeList": ["textarea"],
|
||||
"required": true,
|
||||
"description": "",
|
||||
"canEdit": false,
|
||||
"value": "{{cTime}}",
|
||||
"editField": {
|
||||
"key": true
|
||||
},
|
||||
"maxLength": "",
|
||||
"dynamicParamDefaultValue": {
|
||||
"inputType": "reference",
|
||||
"inputs": [],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "i7uow4wj2wdp",
|
||||
"name": "自定义插件输出",
|
||||
"intro": "自定义配置外部输出,使用插件时,仅暴露自定义配置的输出",
|
||||
"avatar": "/imgs/workflow/output.png",
|
||||
"flowNodeType": "pluginOutput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 1607.7142331269126,
|
||||
"y": -151.8669210746189
|
||||
},
|
||||
"inputs": [
|
||||
{
|
||||
"key": "time",
|
||||
"valueType": "string",
|
||||
"required": true
|
||||
"label": "time",
|
||||
"renderTypeList": ["reference"],
|
||||
"required": false,
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"description": true,
|
||||
"valueType": true
|
||||
},
|
||||
"value": ["WNUvWwYBUfEr", "HdIl1GWi0tnc"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "HdIl1GWi0tnc",
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text",
|
||||
"type": "static",
|
||||
"canEdit": false
|
||||
}
|
||||
],
|
||||
"pluginId": "community-textEditor"
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "lmpb9v2lo2lk",
|
||||
"target": "WNUvWwYBUfEr",
|
||||
"sourceHandle": "lmpb9v2lo2lk-source-right",
|
||||
"targetHandle": "WNUvWwYBUfEr-target-left"
|
||||
},
|
||||
{
|
||||
"source": "WNUvWwYBUfEr",
|
||||
"target": "i7uow4wj2wdp",
|
||||
"sourceHandle": "WNUvWwYBUfEr-source-right",
|
||||
"targetHandle": "i7uow4wj2wdp-target-left"
|
||||
}
|
||||
]
|
||||
],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "WNUvWwYBUfEr",
|
||||
"name": "文本加工",
|
||||
"intro": "可对固定或传入的文本进行加工后输出,非字符串类型数据最终会转成字符串类型。",
|
||||
"flowNodeType": "pluginModule",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 1030.0794269310472,
|
||||
"y": -350.61013802286885
|
||||
},
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"valueType": "dynamic",
|
||||
"label": "动态外部数据",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"required": false,
|
||||
"description": "",
|
||||
"canEdit": false,
|
||||
"value": "",
|
||||
"editField": {
|
||||
"key": true
|
||||
},
|
||||
"dynamicParamDefaultValue": {
|
||||
"inputType": "reference",
|
||||
"valueType": "string",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "文本",
|
||||
"valueType": "string",
|
||||
"label": "文本",
|
||||
"renderTypeList": ["textarea"],
|
||||
"required": true,
|
||||
"description": "",
|
||||
"canEdit": false,
|
||||
"value": "{{cTime}}",
|
||||
"editField": {
|
||||
"key": true
|
||||
},
|
||||
"maxLength": "",
|
||||
"dynamicParamDefaultValue": {
|
||||
"inputType": "reference",
|
||||
"valueType": "string",
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "HdIl1GWi0tnc",
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text",
|
||||
"type": "static",
|
||||
"canEdit": false
|
||||
}
|
||||
],
|
||||
"pluginId": "community-textEditor"
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "lmpb9v2lo2lk",
|
||||
"target": "WNUvWwYBUfEr",
|
||||
"sourceHandle": "lmpb9v2lo2lk-source-right",
|
||||
"targetHandle": "WNUvWwYBUfEr-target-left"
|
||||
},
|
||||
{
|
||||
"source": "WNUvWwYBUfEr",
|
||||
"target": "i7uow4wj2wdp",
|
||||
"sourceHandle": "WNUvWwYBUfEr-source-right",
|
||||
"targetHandle": "i7uow4wj2wdp-target-left"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@@ -1,244 +1,314 @@
|
||||
{
|
||||
"author": "FastGPT Team",
|
||||
"version": "481",
|
||||
"templateType": "tools",
|
||||
"name": "文本加工",
|
||||
"avatar": "/imgs/workflow/textEditor.svg",
|
||||
"intro": "可对固定或传入的文本进行加工后输出,非字符串类型数据最终会转成字符串类型。",
|
||||
"showStatus": false,
|
||||
"isTool": false,
|
||||
"weight": 100,
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "lmpb9v2lo2lk",
|
||||
"name": "自定义插件输入",
|
||||
"intro": "自定义配置外部输入,使用插件时,仅暴露自定义配置的输入",
|
||||
"avatar": "/imgs/workflow/input.png",
|
||||
"flowNodeType": "pluginInput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 616.4226348688949,
|
||||
"y": -165.05298493910115
|
||||
},
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"valueType": "dynamic",
|
||||
"label": "动态外部数据",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"required": false,
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"value": "",
|
||||
"editField": {
|
||||
"key": true
|
||||
|
||||
"isTool": false,
|
||||
"templateType": "tools",
|
||||
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "lmpb9v2lo2lk",
|
||||
"name": "自定义插件输入",
|
||||
"intro": "自定义配置外部输入,使用插件时,仅暴露自定义配置的输入",
|
||||
"avatar": "/imgs/workflow/input.png",
|
||||
"flowNodeType": "pluginInput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 449.3089648771014,
|
||||
"y": -139.7660480324482
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"valueType": "dynamic",
|
||||
"label": "自定义输入变量",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"required": false,
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"value": "",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": ["string"],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": false
|
||||
}
|
||||
},
|
||||
"dynamicParamDefaultValue": {
|
||||
"inputType": "reference",
|
||||
{
|
||||
"key": "文本",
|
||||
"valueType": "string",
|
||||
"required": true
|
||||
"label": "文本",
|
||||
"renderTypeList": ["textarea"],
|
||||
"required": true,
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"value": "",
|
||||
"maxLength": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "文本",
|
||||
"valueType": "string",
|
||||
"label": "文本",
|
||||
"renderTypeList": ["textarea"],
|
||||
"required": true,
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"value": "",
|
||||
"editField": {
|
||||
"key": true
|
||||
},
|
||||
"maxLength": "",
|
||||
"dynamicParamDefaultValue": {
|
||||
"inputType": "reference",
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "ILc8GS7iU53M",
|
||||
"key": "文本",
|
||||
"valueType": "string",
|
||||
"label": "文本",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "2LCxDnOSculb",
|
||||
"key": "system_addInputParam",
|
||||
"valueType": "dynamic",
|
||||
"label": "system_addInputParam",
|
||||
"type": "static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "i7uow4wj2wdp",
|
||||
"name": "自定义插件输出",
|
||||
"intro": "自定义配置外部输出,使用插件时,仅暴露自定义配置的输出",
|
||||
"avatar": "/imgs/workflow/output.png",
|
||||
"flowNodeType": "pluginOutput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 1607.7142331269126,
|
||||
"y": -151.8669210746189
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text",
|
||||
"renderTypeList": ["reference"],
|
||||
"required": false,
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"description": true,
|
||||
"valueType": true
|
||||
},
|
||||
"value": ["CRT7oIEU8v2P", "vooswj3VxKW8"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "HdIl1GWi0tnc",
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text",
|
||||
"type": "static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "CRT7oIEU8v2P",
|
||||
"name": "HTTP 请求",
|
||||
"intro": "可以发出一个 HTTP 请求,实现更为复杂的操作(联网搜索、数据库查询等)",
|
||||
"avatar": "/imgs/workflow/http.png",
|
||||
"flowNodeType": "httpRequest468",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1070.8458389994719,
|
||||
"y": -415.09022555407836
|
||||
},
|
||||
"version": "486",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "core.module.input.description.HTTP Dynamic Input",
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
},
|
||||
"value": ["lmpb9v2lo2lk", "2LCxDnOSculb"],
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "system_httpMethod",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"value": "POST",
|
||||
"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": "/api/plugins/textEditor/v2"
|
||||
},
|
||||
{
|
||||
"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": [],
|
||||
"label": "",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "system_httpJsonBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": "{\r\n \"text\":\"{{text}}\",\r\n \"customInputs\": {{customInputs}}\r\n}",
|
||||
"label": "",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text",
|
||||
"renderTypeList": ["reference"],
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
},
|
||||
"value": ["lmpb9v2lo2lk", "ILc8GS7iU53M"]
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"valueType": "dynamic",
|
||||
"canEdit": true,
|
||||
"key": "customInputs",
|
||||
"label": "customInputs",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"required": true,
|
||||
"value": ["lmpb9v2lo2lk", "2LCxDnOSculb"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "ILc8GS7iU53M",
|
||||
"key": "文本",
|
||||
"valueType": "string",
|
||||
"label": "文本",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "2LCxDnOSculb",
|
||||
"key": "system_addInputParam",
|
||||
"valueType": "dynamic",
|
||||
"label": "动态外部数据",
|
||||
"type": "static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "i7uow4wj2wdp",
|
||||
"name": "自定义插件输出",
|
||||
"intro": "自定义配置外部输出,使用插件时,仅暴露自定义配置的输出",
|
||||
"avatar": "/imgs/workflow/output.png",
|
||||
"flowNodeType": "pluginOutput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 1607.7142331269126,
|
||||
"y": -151.8669210746189
|
||||
},
|
||||
"inputs": [
|
||||
{
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text",
|
||||
"renderTypeList": ["reference"],
|
||||
"required": false,
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"description": true,
|
||||
"valueType": true
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"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": true
|
||||
}
|
||||
},
|
||||
"value": ["CRT7oIEU8v2P", "vooswj3VxKW8"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "HdIl1GWi0tnc",
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text",
|
||||
"type": "static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "CRT7oIEU8v2P",
|
||||
"name": "HTTP 请求",
|
||||
"intro": "可以发出一个 HTTP 请求,实现更为复杂的操作(联网搜索、数据库查询等)",
|
||||
"avatar": "/imgs/workflow/http.png",
|
||||
"flowNodeType": "httpRequest468",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1070.8458389994719,
|
||||
"y": -415.09022555407836
|
||||
},
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "core.module.input.description.HTTP Dynamic Input",
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
{
|
||||
"id": "error",
|
||||
"key": "error",
|
||||
"label": "请求错误",
|
||||
"description": "HTTP请求错误信息,成功时返回空",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
"value": ["lmpb9v2lo2lk", "2LCxDnOSculb"]
|
||||
},
|
||||
{
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text",
|
||||
"renderTypeList": ["reference"],
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
{
|
||||
"id": "httpRawResponse",
|
||||
"key": "httpRawResponse",
|
||||
"label": "原始响应",
|
||||
"required": true,
|
||||
"description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
|
||||
"valueType": "any",
|
||||
"type": "static"
|
||||
},
|
||||
"value": ["lmpb9v2lo2lk", "ILc8GS7iU53M"]
|
||||
},
|
||||
{
|
||||
"key": "system_httpMethod",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"value": "POST",
|
||||
"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": "/api/plugins/textEditor/v2"
|
||||
},
|
||||
{
|
||||
"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": [],
|
||||
"label": "",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "system_httpJsonBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": "{\r\n \"text\":\"{{text}}\",\r\n \"system_addInputParam\": {{system_addInputParam}}\r\n}",
|
||||
"label": "",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
{
|
||||
"id": "vooswj3VxKW8",
|
||||
"type": "dynamic",
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "httpRawResponse",
|
||||
"key": "httpRawResponse",
|
||||
"label": "原始响应",
|
||||
"description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
|
||||
"valueType": "any",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "vooswj3VxKW8",
|
||||
"type": "dynamic",
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "lmpb9v2lo2lk",
|
||||
"target": "CRT7oIEU8v2P",
|
||||
"sourceHandle": "lmpb9v2lo2lk-source-right",
|
||||
"targetHandle": "CRT7oIEU8v2P-target-left"
|
||||
},
|
||||
{
|
||||
"source": "CRT7oIEU8v2P",
|
||||
"target": "i7uow4wj2wdp",
|
||||
"sourceHandle": "CRT7oIEU8v2P-source-right",
|
||||
"targetHandle": "i7uow4wj2wdp-target-left"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "lmpb9v2lo2lk",
|
||||
"target": "CRT7oIEU8v2P",
|
||||
"sourceHandle": "lmpb9v2lo2lk-source-right",
|
||||
"targetHandle": "CRT7oIEU8v2P-target-left"
|
||||
},
|
||||
{
|
||||
"source": "CRT7oIEU8v2P",
|
||||
"target": "i7uow4wj2wdp",
|
||||
"sourceHandle": "CRT7oIEU8v2P-source-right",
|
||||
"targetHandle": "i7uow4wj2wdp-target-left"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user