mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Rewrite Support specified language or language according to initial question (#4990)
Support specified language or language according to initial question --------- Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
This commit is contained in:
@ -523,6 +523,8 @@ This procedure will improve precision of retrieval by adding more information to
|
||||
'It will retrieve descriptions of relevant entities,relations and community reports, which will enhance inference of multi-hop and complex question.',
|
||||
keyword: 'Keyword analysis',
|
||||
keywordTip: `Apply LLM to analyze user's questions, extract keywords which will be emphesize during the relevance omputation.`,
|
||||
languageTip:
|
||||
'Allows sentence rewriting with the specified language or defaults to the latest question if not selected.',
|
||||
},
|
||||
setting: {
|
||||
profile: 'Profile',
|
||||
|
||||
@ -426,6 +426,7 @@ export const initialGenerateValues = {
|
||||
|
||||
export const initialRewriteQuestionValues = {
|
||||
...initialLlmBaseValues,
|
||||
language: '',
|
||||
message_history_window_size: 6,
|
||||
};
|
||||
|
||||
|
||||
@ -166,6 +166,7 @@ const FormDrawer = ({
|
||||
></Input>
|
||||
)}
|
||||
</Flex>
|
||||
|
||||
{needsSingleStepDebugging(operatorName) && (
|
||||
<RunTooltip>
|
||||
<Play
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import LLMSelect from '@/components/llm-select';
|
||||
import MessageHistoryWindowSizeItem from '@/components/message-history-window-size-item';
|
||||
import { useTranslate } from '@/hooks/common-hooks';
|
||||
import { Form } from 'antd';
|
||||
import { Form, Select } from 'antd';
|
||||
import { GoogleLanguageOptions } from '../../constant';
|
||||
import { IOperatorForm } from '../../interface';
|
||||
|
||||
const RewriteQuestionForm = ({ onValuesChange, form }: IOperatorForm) => {
|
||||
@ -23,6 +24,13 @@ const RewriteQuestionForm = ({ onValuesChange, form }: IOperatorForm) => {
|
||||
>
|
||||
<LLMSelect></LLMSelect>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t('language')}
|
||||
name={'language'}
|
||||
tooltip={t('languageTip')}
|
||||
>
|
||||
<Select options={GoogleLanguageOptions} allowClear={true}></Select>
|
||||
</Form.Item>
|
||||
<MessageHistoryWindowSizeItem
|
||||
initialValue={6}
|
||||
></MessageHistoryWindowSizeItem>
|
||||
|
||||
Reference in New Issue
Block a user