From e5f415e2405dd87cabf621b04e267a9664f1e7f1 Mon Sep 17 00:00:00 2001 From: balibabu Date: Mon, 23 Sep 2024 15:26:11 +0800 Subject: [PATCH] feat: Refine reteival of multi-turn conversation #2362 (#2539) ### What problem does this PR solve? feat: Refine reteival of multi-turn conversation #2362 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- web/src/locales/en.ts | 3 +++ web/src/locales/zh-traditional.ts | 3 +++ web/src/locales/zh.ts | 3 +++ .../pages/chat/chat-configuration-modal/prompt-engine.tsx | 8 ++++++++ 4 files changed, 17 insertions(+) diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts index ed0586f88c5..92a85297bcd 100644 --- a/web/src/locales/en.ts +++ b/web/src/locales/en.ts @@ -435,6 +435,9 @@ The above is the content you need to summarize.`, 'To play the voice using voice conversion, please select TTS (speech conversion model) in the settings first.', relatedQuestion: 'Related question', answerTitle: 'R', + multiTurn: 'Multi-trun optimization', + multiTurnTip: + 'In multi-round conversations, the query to the knowledge base is optimized. The large model will be called to consume additional tokens.', }, setting: { profile: 'Profile', diff --git a/web/src/locales/zh-traditional.ts b/web/src/locales/zh-traditional.ts index 04589bd6bfb..ee355f10f9b 100644 --- a/web/src/locales/zh-traditional.ts +++ b/web/src/locales/zh-traditional.ts @@ -404,6 +404,9 @@ export default { ttsTip: '是否用語音轉換播放語音,請先在設定裡面選擇TTS(語音轉換模型)。', relatedQuestion: '相關問題', answerTitle: '智慧回答', + multiTurn: '多輪對話優化', + multiTurnTip: + '在多輪對話的中,對去知識庫查詢的問題進行最佳化。會呼叫大模型額外消耗token。', }, setting: { profile: '概述', diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.ts index 796774d7b61..cc11c804c30 100644 --- a/web/src/locales/zh.ts +++ b/web/src/locales/zh.ts @@ -421,6 +421,9 @@ export default { ttsTip: '是否用语音转换播放语音,请先在设置里面选择TTS(语音转换模型)。', relatedQuestion: '相关问题', answerTitle: '智能回答', + multiTurn: '多轮对话优化', + multiTurnTip: + '在多轮对话的中,对去知识库查询的问题进行优化。会调用大模型额外消耗token。', }, setting: { profile: '概要', diff --git a/web/src/pages/chat/chat-configuration-modal/prompt-engine.tsx b/web/src/pages/chat/chat-configuration-modal/prompt-engine.tsx index 91c4402d5de..3e65437079d 100644 --- a/web/src/pages/chat/chat-configuration-modal/prompt-engine.tsx +++ b/web/src/pages/chat/chat-configuration-modal/prompt-engine.tsx @@ -160,6 +160,14 @@ const PromptEngine = ( + + +