From 608e58ba41a1449794182fded3a304654b5014a1 Mon Sep 17 00:00:00 2001 From: Archer <545436317@qq.com> Date: Sat, 9 Nov 2024 15:07:24 +0800 Subject: [PATCH] 4.8.13 test (#3107) * perf: select file * perf: drop files * fix: imple mode adapt files --- .../core/workflow/dispatch/agent/runTool/toolChoice.ts | 2 +- packages/web/i18n/en/app.json | 1 + packages/web/i18n/zh/app.json | 1 + projects/app/src/web/core/app/utils.ts | 6 +++--- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/service/core/workflow/dispatch/agent/runTool/toolChoice.ts b/packages/service/core/workflow/dispatch/agent/runTool/toolChoice.ts index 10fe57150..00d90457d 100644 --- a/packages/service/core/workflow/dispatch/agent/runTool/toolChoice.ts +++ b/packages/service/core/workflow/dispatch/agent/runTool/toolChoice.ts @@ -269,7 +269,7 @@ export const runToolWithToolChoice = async ( }, toolModel ); - // console.log(JSON.stringify(requestMessages, null, 2), '==requestBody'); + // console.log(JSON.stringify(requestBody, null, 2), '==requestBody'); /* Run llm */ const ai = getAIApi({ timeout: 480000 diff --git a/packages/web/i18n/en/app.json b/packages/web/i18n/en/app.json index 80f7e6024..b0f370d3a 100644 --- a/packages/web/i18n/en/app.json +++ b/packages/web/i18n/en/app.json @@ -30,6 +30,7 @@ "cron.every_month": "Run Monthly", "cron.every_week": "Run Weekly", "cron.interval": "Run at Intervals", + "dataset_search_tool_description": "Call the \"Semantic Search\" and \"Full-text Search\" capabilities to find reference content that may be related to the problem from the \"Knowledge Base\". \nPrioritize calling this tool to assist in answering user questions.", "day": "Day", "document_quote": "Document Reference", "document_quote_tip": "Usually used to accept user-uploaded document content (requires document parsing), and can also be used to reference other string data.", diff --git a/packages/web/i18n/zh/app.json b/packages/web/i18n/zh/app.json index 4b61a986e..a9d178419 100644 --- a/packages/web/i18n/zh/app.json +++ b/packages/web/i18n/zh/app.json @@ -30,6 +30,7 @@ "cron.every_month": "每月执行", "cron.every_week": "每周执行", "cron.interval": "间隔执行", + "dataset_search_tool_description": "调用“语义检索”和“全文检索”能力,从“知识库”中查找可能与问题相关的参考内容。优先调用该工具来辅助回答用户的问题。", "day": "日", "document_quote": "文档引用", "document_quote_tip": "通常用于接受用户上传的文档内容(这需要文档解析),也可以用于引用其他字符串数据。", diff --git a/projects/app/src/web/core/app/utils.ts b/projects/app/src/web/core/app/utils.ts index 1e6878da0..f2a06f207 100644 --- a/projects/app/src/web/core/app/utils.ts +++ b/projects/app/src/web/core/app/utils.ts @@ -181,7 +181,7 @@ export function form2AppWorkflow( }, { ...Input_Template_File_Link_Prompt, - value: [workflowStartNodeId, NodeOutputKeyEnum.userFiles] + value: [[workflowStartNodeId, NodeOutputKeyEnum.userFiles]] }, { key: NodeInputKeyEnum.aiChatVision, @@ -198,7 +198,7 @@ export function form2AppWorkflow( return { nodeId: datasetNodeId, name: t(DatasetSearchModule.name), - intro: t(DatasetSearchModule.intro), + intro: t('app:dataset_search_tool_description'), avatar: DatasetSearchModule.avatar, flowNodeType: DatasetSearchModule.flowNodeType, showStatus: true, @@ -451,7 +451,7 @@ export function form2AppWorkflow( }, { ...Input_Template_File_Link_Prompt, - value: [workflowStartNodeId, NodeOutputKeyEnum.userFiles] + value: [[workflowStartNodeId, NodeOutputKeyEnum.userFiles]] }, { key: 'userChatInput',