Browse Source

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)
tags/v0.1.0
balibabu 1 year ago
parent
commit
73285d9d07
No account linked to committer's email address

+ 2
- 0
web/src/locales/en.ts View File

@@ -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',

+ 2
- 0
web/src/locales/zh-traditional.ts View File

@@ -308,6 +308,8 @@ export default {
maxTokensMessage: '最大token數是必填項',
maxTokensTip:
'這設置了模型輸出的最大長度,以標記(單詞或單詞片段)的數量來衡量。',
quote: '顯示引文',
quoteTip: '是否應該顯示原文出處?',
},
setting: {
profile: '概述',

+ 2
- 0
web/src/locales/zh.ts View File

@@ -324,6 +324,8 @@ export default {
maxTokensMessage: '最大token数是必填项',
maxTokensTip:
'这设置了模型输出的最大长度,以标记(单词或单词片段)的数量来衡量。',
quote: '显示引文',
quoteTip: '是否应该显示原文出处?',
},
setting: {
profile: '概要',

+ 9
- 0
web/src/pages/chat/chat-configuration-modal/prompt-engine.tsx View File

@@ -172,6 +172,15 @@ const PromptEngine = (
>
<Slider max={30} />
</Form.Item>
<Form.Item
label={t('quote')}
valuePropName="checked"
name={['prompt_config', 'quote']}
tooltip={t('quoteTip')}
initialValue={true}
>
<Switch />
</Form.Item>
<section className={classNames(styles.variableContainer)}>
<Row align={'middle'} justify="end">
<Col span={7} className={styles.variableAlign}>

+ 2
- 2
web/src/pages/chat/index.tsx View File

@@ -177,7 +177,7 @@ const Chat = () => {
label: (
<Space>
<EditOutlined />
Edit
{t('rename', { keyPrefix: 'common' })}
</Space>
),
},
@@ -188,7 +188,7 @@ const Chat = () => {
label: (
<Space>
<DeleteOutlined />
Delete chat
{t('delete', { keyPrefix: 'common' })}
</Space>
),
},

Loading…
Cancel
Save