V4.8.17 feature (#3485)
* feat: add third party account config (#3443) * temp * editor workflow variable style * add team to dispatch * i18n * delete console * change openai account position * fix * fix * fix * fix * fix * 4.8.17 test (#3461) * perf: external provider config * perf: ui * feat: add template config (#3434) * change template position * template config * delete console * delete * fix * fix * perf: Mongo visutal field (#3464) * remve invalid code * perf: team member visutal code * perf: virtual search; perf: search test data * fix: ts * fix: image response headers * perf: template code * perf: auth layout;perf: auto save (#3472) * perf: auth layout * perf: auto save * perf: auto save * fix: template guide display & http input support external variables (#3475) * fix: template guide display * http editor support external workflow variables * perf: auto save;fix: ifelse checker line break; (#3478) * perf: auto save * perf: auto save * fix: ifelse checker line break * perf: doc * perf: doc * fix: update var type error * 4.8.17 test (#3479) * perf: auto save * perf: auto save * perf: template code * 4.8.17 test (#3480) * perf: auto save * perf: auto save * perf: model price model * feat: add react memo * perf: model provider filter * fix: ts (#3481) * perf: auto save * perf: auto save * fix: ts * simple app tool select (#3473) * workflow plugin userguide & simple tool ui * simple tool filter * reuse component * change component to hook * fix * perf: too selector modal (#3484) * perf: auto save * perf: auto save * perf: markdown render * perf: too selector * fix: app version require tmbId * perf: templates refresh * perf: templates refresh * hide auto save error tip * perf: toolkit guide --------- Co-authored-by: heheer <heheer@sealos.io>
This commit is contained in:
411
packages/templates/src/CQ/template.json
Normal file
411
packages/templates/src/CQ/template.json
Normal file
@@ -0,0 +1,411 @@
|
||||
{
|
||||
"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-4o-mini"
|
||||
},
|
||||
{
|
||||
"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-4o-mini"
|
||||
},
|
||||
{
|
||||
"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": 1500,
|
||||
"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[如何使用]"
|
||||
}
|
||||
}
|
||||
}
|
||||
507
packages/templates/src/Chinese/template.json
Normal file
507
packages/templates/src/Chinese/template.json
Normal file
@@ -0,0 +1,507 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
581
packages/templates/src/TranslateRobot/template.json
Normal file
581
packages/templates/src/TranslateRobot/template.json
Normal file
@@ -0,0 +1,581 @@
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
503
packages/templates/src/animalLife/template.json
Normal file
503
packages/templates/src/animalLife/template.json
Normal file
File diff suppressed because one or more lines are too long
196
packages/templates/src/chatGuide/template.json
Normal file
196
packages/templates/src/chatGuide/template.json
Normal file
@@ -0,0 +1,196 @@
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
518
packages/templates/src/divination/template.json
Normal file
518
packages/templates/src/divination/template.json
Normal file
File diff suppressed because one or more lines are too long
330
packages/templates/src/flux/template.json
Normal file
330
packages/templates/src/flux/template.json
Normal file
@@ -0,0 +1,330 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
926
packages/templates/src/githubIssue/template.json
Normal file
926
packages/templates/src/githubIssue/template.json
Normal file
@@ -0,0 +1,926 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
443
packages/templates/src/google/template.json
Normal file
443
packages/templates/src/google/template.json
Normal file
@@ -0,0 +1,443 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
2161
packages/templates/src/longTranslate/template.json
Normal file
2161
packages/templates/src/longTranslate/template.json
Normal file
File diff suppressed because one or more lines are too long
330
packages/templates/src/plugin-dalle/template.json
Normal file
330
packages/templates/src/plugin-dalle/template.json
Normal file
@@ -0,0 +1,330 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
355
packages/templates/src/plugin-feishu/template.json
Normal file
355
packages/templates/src/plugin-feishu/template.json
Normal file
@@ -0,0 +1,355 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
288
packages/templates/src/simpleDatasetChat/template.json
Normal file
288
packages/templates/src/simpleDatasetChat/template.json
Normal file
@@ -0,0 +1,288 @@
|
||||
{
|
||||
"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-4o-mini"
|
||||
},
|
||||
{
|
||||
"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": 1500,
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
1934
packages/templates/src/srt-translate/template.json
Normal file
1934
packages/templates/src/srt-translate/template.json
Normal file
File diff suppressed because it is too large
Load Diff
503
packages/templates/src/stock/template.json
Normal file
503
packages/templates/src/stock/template.json
Normal file
@@ -0,0 +1,503 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
186
packages/templates/src/timeBot/template.json
Normal file
186
packages/templates/src/timeBot/template.json
Normal file
@@ -0,0 +1,186 @@
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user