feat: support Self-RAG #1069 (#1079)

### What problem does this PR solve?

feat: support Self-RAG #1069
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu 2024-06-06 15:30:51 +08:00 committed by GitHub
parent db35e9df4f
commit 1552dca28d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 15 additions and 0 deletions

View File

@ -379,6 +379,8 @@ The above is the content you need to summarize.`,
'This sets the maximum length of the models output, measured in the number of tokens (words or pieces of words).', 'This sets the maximum length of the models output, measured in the number of tokens (words or pieces of words).',
quote: 'Show Quote', quote: 'Show Quote',
quoteTip: 'Should the source of the original text be displayed?', quoteTip: 'Should the source of the original text be displayed?',
selfRag: 'Self-RAG',
selfRagTip: 'Please refer to: https://huggingface.co/papers/2310.11511',
overview: 'Chat Bot API', overview: 'Chat Bot API',
pv: 'Number of messages', pv: 'Number of messages',
uv: 'Active user number', uv: 'Active user number',

View File

@ -350,6 +350,8 @@ export default {
'這設置了模型輸出的最大長度,以標記(單詞或單詞片段)的數量來衡量。', '這設置了模型輸出的最大長度,以標記(單詞或單詞片段)的數量來衡量。',
quote: '顯示引文', quote: '顯示引文',
quoteTip: '是否應該顯示原文出處?', quoteTip: '是否應該顯示原文出處?',
selfRag: '自反令牌',
selfRagTip: '請參考: https://huggingface.co/papers/2310.11511',
overview: '聊天 API', overview: '聊天 API',
pv: '消息數', pv: '消息數',
uv: '活躍用戶數', uv: '活躍用戶數',

View File

@ -367,6 +367,8 @@ export default {
'这设置了模型输出的最大长度,以标记(单词或单词片段)的数量来衡量。', '这设置了模型输出的最大长度,以标记(单词或单词片段)的数量来衡量。',
quote: '显示引文', quote: '显示引文',
quoteTip: '是否应该显示原文出处?', quoteTip: '是否应该显示原文出处?',
selfRag: '自反令牌',
selfRagTip: '请参考: https://huggingface.co/papers/2310.11511',
overview: '聊天 API', overview: '聊天 API',
pv: '消息数', pv: '消息数',
uv: '活跃用户数', uv: '活跃用户数',

View File

@ -90,6 +90,15 @@ const AssistantSetting = ({ show }: ISegmentedContentProps) => {
> >
<Switch /> <Switch />
</Form.Item> </Form.Item>
<Form.Item
label={t('selfRag')}
valuePropName="checked"
name={['prompt_config', 'self_rag']}
tooltip={t('selfRagTip')}
initialValue={true}
>
<Switch />
</Form.Item>
<KnowledgeBaseItem></KnowledgeBaseItem> <KnowledgeBaseItem></KnowledgeBaseItem>
</section> </section>
); );