Files
FastGPT/projects/app/data/pluginTemplates/customFeedback.json
2024-05-06 15:21:29 +08:00

212 lines
6.1 KiB
JSON

{
"author": "FastGPT Team",
"templateType": "other",
"name": "自定义反馈",
"avatar": "/imgs/workflow/customFeedback.svg",
"intro": "该模块被触发时,会给当前的对话记录增加一条反馈。可用于自动记录对话效果等。",
"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
},
"dynamicParamDefaultValue": {
"inputType": "reference",
"valueType": "string",
"required": true
}
},
{
"key": "反馈内容",
"valueType": "string",
"label": "反馈内容",
"renderTypeList": ["textarea"],
"description": "",
"canEdit": true,
"value": "",
"editField": {
"key": true
},
"maxLength": "",
"dynamicParamDefaultValue": {
"inputType": "reference",
"valueType": "string",
"required": true
}
}
],
"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": [],
"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
},
"value": ["lmpb9v2lo2lk", "2LCxDnOSculb"]
},
{
"key": "customFeedback",
"valueType": "string",
"label": "customFeedback",
"renderTypeList": ["reference"],
"description": "",
"canEdit": true,
"editField": {
"key": true,
"valueType": true
},
"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": "httpRawResponse",
"key": "httpRawResponse",
"label": "原始响应",
"description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
"valueType": "any",
"type": "static"
}
]
}
],
"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"
}
]
}