From 73285d9d079110cacaac9676afc225b7d6ecda39 Mon Sep 17 00:00:00 2001 From: balibabu Date: Fri, 12 Apr 2024 14:45:14 +0800 Subject: [PATCH] feat: add quote item to PromptEngine (#338) ### What problem does this PR solve? Show original text source in conversation messages Issue link: #337 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- web/src/locales/en.ts | 2 ++ web/src/locales/zh-traditional.ts | 2 ++ web/src/locales/zh.ts | 2 ++ .../chat/chat-configuration-modal/prompt-engine.tsx | 9 +++++++++ web/src/pages/chat/index.tsx | 4 ++-- 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts index 1dccda9f7..430250bde 100644 --- a/web/src/locales/en.ts +++ b/web/src/locales/en.ts @@ -333,6 +333,8 @@ export default { maxTokensMessage: 'Max Tokens is required', maxTokensTip: 'This sets the maximum length of the model’s output, measured in the number of tokens (words or pieces of words).', + quote: 'Show Quote', + quoteTip: 'Should the source of the original text be displayed?', }, setting: { profile: 'Profile', diff --git a/web/src/locales/zh-traditional.ts b/web/src/locales/zh-traditional.ts index b2a3e7282..b6af19896 100644 --- a/web/src/locales/zh-traditional.ts +++ b/web/src/locales/zh-traditional.ts @@ -308,6 +308,8 @@ export default { maxTokensMessage: '最大token數是必填項', maxTokensTip: '這設置了模型輸出的最大長度,以標記(單詞或單詞片段)的數量來衡量。', + quote: '顯示引文', + quoteTip: '是否應該顯示原文出處?', }, setting: { profile: '概述', diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.ts index 0b2a86eb9..e2bbd0482 100644 --- a/web/src/locales/zh.ts +++ b/web/src/locales/zh.ts @@ -324,6 +324,8 @@ export default { maxTokensMessage: '最大token数是必填项', maxTokensTip: '这设置了模型输出的最大长度,以标记(单词或单词片段)的数量来衡量。', + quote: '显示引文', + quoteTip: '是否应该显示原文出处?', }, 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 1e49bc948..43d8c530e 100644 --- a/web/src/pages/chat/chat-configuration-modal/prompt-engine.tsx +++ b/web/src/pages/chat/chat-configuration-modal/prompt-engine.tsx @@ -172,6 +172,15 @@ const PromptEngine = ( > + + +
diff --git a/web/src/pages/chat/index.tsx b/web/src/pages/chat/index.tsx index e18d30cd4..38f826c9a 100644 --- a/web/src/pages/chat/index.tsx +++ b/web/src/pages/chat/index.tsx @@ -177,7 +177,7 @@ const Chat = () => { label: ( - Edit + {t('rename', { keyPrefix: 'common' })} ), }, @@ -188,7 +188,7 @@ const Chat = () => { label: ( - Delete chat + {t('delete', { keyPrefix: 'common' })} ), },