balibabu
commited on
Commit
·
f6eb84a
1
Parent(s):
74ade83
feat: add quote item to PromptEngine (#338)
Browse files### 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
CHANGED
|
@@ -333,6 +333,8 @@ export default {
|
|
| 333 |
maxTokensMessage: 'Max Tokens is required',
|
| 334 |
maxTokensTip:
|
| 335 |
'This sets the maximum length of the model’s output, measured in the number of tokens (words or pieces of words).',
|
|
|
|
|
|
|
| 336 |
},
|
| 337 |
setting: {
|
| 338 |
profile: 'Profile',
|
|
|
|
| 333 |
maxTokensMessage: 'Max Tokens is required',
|
| 334 |
maxTokensTip:
|
| 335 |
'This sets the maximum length of the model’s output, measured in the number of tokens (words or pieces of words).',
|
| 336 |
+
quote: 'Show Quote',
|
| 337 |
+
quoteTip: 'Should the source of the original text be displayed?',
|
| 338 |
},
|
| 339 |
setting: {
|
| 340 |
profile: 'Profile',
|
web/src/locales/zh-traditional.ts
CHANGED
|
@@ -308,6 +308,8 @@ export default {
|
|
| 308 |
maxTokensMessage: '最大token數是必填項',
|
| 309 |
maxTokensTip:
|
| 310 |
'這設置了模型輸出的最大長度,以標記(單詞或單詞片段)的數量來衡量。',
|
|
|
|
|
|
|
| 311 |
},
|
| 312 |
setting: {
|
| 313 |
profile: '概述',
|
|
|
|
| 308 |
maxTokensMessage: '最大token數是必填項',
|
| 309 |
maxTokensTip:
|
| 310 |
'這設置了模型輸出的最大長度,以標記(單詞或單詞片段)的數量來衡量。',
|
| 311 |
+
quote: '顯示引文',
|
| 312 |
+
quoteTip: '是否應該顯示原文出處?',
|
| 313 |
},
|
| 314 |
setting: {
|
| 315 |
profile: '概述',
|
web/src/locales/zh.ts
CHANGED
|
@@ -324,6 +324,8 @@ export default {
|
|
| 324 |
maxTokensMessage: '最大token数是必填项',
|
| 325 |
maxTokensTip:
|
| 326 |
'这设置了模型输出的最大长度,以标记(单词或单词片段)的数量来衡量。',
|
|
|
|
|
|
|
| 327 |
},
|
| 328 |
setting: {
|
| 329 |
profile: '概要',
|
|
|
|
| 324 |
maxTokensMessage: '最大token数是必填项',
|
| 325 |
maxTokensTip:
|
| 326 |
'这设置了模型输出的最大长度,以标记(单词或单词片段)的数量来衡量。',
|
| 327 |
+
quote: '显示引文',
|
| 328 |
+
quoteTip: '是否应该显示原文出处?',
|
| 329 |
},
|
| 330 |
setting: {
|
| 331 |
profile: '概要',
|
web/src/pages/chat/chat-configuration-modal/prompt-engine.tsx
CHANGED
|
@@ -172,6 +172,15 @@ const PromptEngine = (
|
|
| 172 |
>
|
| 173 |
<Slider max={30} />
|
| 174 |
</Form.Item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
<section className={classNames(styles.variableContainer)}>
|
| 176 |
<Row align={'middle'} justify="end">
|
| 177 |
<Col span={7} className={styles.variableAlign}>
|
|
|
|
| 172 |
>
|
| 173 |
<Slider max={30} />
|
| 174 |
</Form.Item>
|
| 175 |
+
<Form.Item
|
| 176 |
+
label={t('quote')}
|
| 177 |
+
valuePropName="checked"
|
| 178 |
+
name={['prompt_config', 'quote']}
|
| 179 |
+
tooltip={t('quoteTip')}
|
| 180 |
+
initialValue={true}
|
| 181 |
+
>
|
| 182 |
+
<Switch />
|
| 183 |
+
</Form.Item>
|
| 184 |
<section className={classNames(styles.variableContainer)}>
|
| 185 |
<Row align={'middle'} justify="end">
|
| 186 |
<Col span={7} className={styles.variableAlign}>
|
web/src/pages/chat/index.tsx
CHANGED
|
@@ -177,7 +177,7 @@ const Chat = () => {
|
|
| 177 |
label: (
|
| 178 |
<Space>
|
| 179 |
<EditOutlined />
|
| 180 |
-
|
| 181 |
</Space>
|
| 182 |
),
|
| 183 |
},
|
|
@@ -188,7 +188,7 @@ const Chat = () => {
|
|
| 188 |
label: (
|
| 189 |
<Space>
|
| 190 |
<DeleteOutlined />
|
| 191 |
-
|
| 192 |
</Space>
|
| 193 |
),
|
| 194 |
},
|
|
|
|
| 177 |
label: (
|
| 178 |
<Space>
|
| 179 |
<EditOutlined />
|
| 180 |
+
{t('rename', { keyPrefix: 'common' })}
|
| 181 |
</Space>
|
| 182 |
),
|
| 183 |
},
|
|
|
|
| 188 |
label: (
|
| 189 |
<Space>
|
| 190 |
<DeleteOutlined />
|
| 191 |
+
{t('delete', { keyPrefix: 'common' })}
|
| 192 |
</Space>
|
| 193 |
),
|
| 194 |
},
|