mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-06-04 11:24:00 +08:00
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)
This commit is contained in:
parent
f173fe6e47
commit
73285d9d07
@ -333,6 +333,8 @@ export default {
|
|||||||
maxTokensMessage: 'Max Tokens is required',
|
maxTokensMessage: 'Max Tokens is required',
|
||||||
maxTokensTip:
|
maxTokensTip:
|
||||||
'This sets the maximum length of the model’s output, measured in the number of tokens (words or pieces of words).',
|
'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: {
|
setting: {
|
||||||
profile: 'Profile',
|
profile: 'Profile',
|
||||||
|
@ -308,6 +308,8 @@ export default {
|
|||||||
maxTokensMessage: '最大token數是必填項',
|
maxTokensMessage: '最大token數是必填項',
|
||||||
maxTokensTip:
|
maxTokensTip:
|
||||||
'這設置了模型輸出的最大長度,以標記(單詞或單詞片段)的數量來衡量。',
|
'這設置了模型輸出的最大長度,以標記(單詞或單詞片段)的數量來衡量。',
|
||||||
|
quote: '顯示引文',
|
||||||
|
quoteTip: '是否應該顯示原文出處?',
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
profile: '概述',
|
profile: '概述',
|
||||||
|
@ -324,6 +324,8 @@ export default {
|
|||||||
maxTokensMessage: '最大token数是必填项',
|
maxTokensMessage: '最大token数是必填项',
|
||||||
maxTokensTip:
|
maxTokensTip:
|
||||||
'这设置了模型输出的最大长度,以标记(单词或单词片段)的数量来衡量。',
|
'这设置了模型输出的最大长度,以标记(单词或单词片段)的数量来衡量。',
|
||||||
|
quote: '显示引文',
|
||||||
|
quoteTip: '是否应该显示原文出处?',
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
profile: '概要',
|
profile: '概要',
|
||||||
|
@ -172,6 +172,15 @@ const PromptEngine = (
|
|||||||
>
|
>
|
||||||
<Slider max={30} />
|
<Slider max={30} />
|
||||||
</Form.Item>
|
</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)}>
|
<section className={classNames(styles.variableContainer)}>
|
||||||
<Row align={'middle'} justify="end">
|
<Row align={'middle'} justify="end">
|
||||||
<Col span={7} className={styles.variableAlign}>
|
<Col span={7} className={styles.variableAlign}>
|
||||||
|
@ -177,7 +177,7 @@ const Chat = () => {
|
|||||||
label: (
|
label: (
|
||||||
<Space>
|
<Space>
|
||||||
<EditOutlined />
|
<EditOutlined />
|
||||||
Edit
|
{t('rename', { keyPrefix: 'common' })}
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@ -188,7 +188,7 @@ const Chat = () => {
|
|||||||
label: (
|
label: (
|
||||||
<Space>
|
<Space>
|
||||||
<DeleteOutlined />
|
<DeleteOutlined />
|
||||||
Delete chat
|
{t('delete', { keyPrefix: 'common' })}
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user