Fix: Modify the text of the category operator form #4412 (#4433)

### What problem does this PR solve?

Fix: Modify the text of the category operator form #4412

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu 2025-01-09 19:17:22 +08:00 committed by GitHub
parent 300d8ecf51
commit 48bca0ca01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 19 additions and 23 deletions

View File

@ -729,7 +729,7 @@ This procedure will improve precision of retrieval by adding more information to
generateDescription: `A component that prompts the LLM to generate responses. Ensure the prompt is set correctly.`,
categorizeDescription: `A component that uses the LLM to classify user inputs into predefined categories. Ensure you specify the name, description, and examples for each category, along with the corresponding next component.`,
relevantDescription: `A component that uses the LLM to assess whether the upstream output is relevant to the user's latest query. Ensure you specify the next component for each judge result.`,
rewriteQuestionDescription: `A component that refines a user query if it fails to retrieve relevant information from the knowledge base. It repeats this process until the predefined looping upper limit is reached. Ensure its upstream is 'Relevant' and downstream is 'Retrieval'. `,
rewriteQuestionDescription: `A component that refines a user query if it fails to retrieve relevant information from the knowledge base. It repeats this process until the predefined looping upper limit is reached.`,
messageDescription:
"A component that sends out a static message. If multiple messages are supplied, it randomly selects one to send. Ensure its downstream is 'Answer', the interface component.",
keywordDescription: `A component that retrieves top N search results from user's input. Ensure the TopN value is set properly before use.`,
@ -1129,6 +1129,9 @@ This delimiter is used to split the input text into several text pieces echo of
variableSettings: 'Variable settings',
globalVariables: 'Global variables',
systemPrompt: 'System prompt',
addCategory: 'Add category',
categoryName: 'Category name',
nextStep: 'Next step',
},
footer: {
profile: 'All rights reserved @ React',

View File

@ -699,7 +699,7 @@ export default {
generateDescription: `此元件用於呼叫LLM生成文本請注意提示的設定。`,
categorizeDescription: `此組件用於對文字進行分類。請指定類別的名稱、描述和範例。每個類別都指向不同的下游組件。`,
relevantDescription: `此元件用來判斷upstream的輸出是否與使用者最新的問題相關『是』代表相關『否』代表不相關。`,
rewriteQuestionDescription: `此元件用於細化使用者的提問。通常,當使用者的原始提問無法從知識庫中檢索相關資訊時,此元件可協助您將問題變更為更符合知識庫表達方式的適當問題。只有「檢索」可作為其下游。`,
rewriteQuestionDescription: `此元件用於細化使用者的提問。通常,當使用者的原始提問無法從知識庫中檢索相關資訊時,此元件可協助您將問題變更為更符合知識庫表達方式的適當問題。`,
messageDescription:
'此元件用於向使用者發送靜態訊息。您可以準備幾條訊息,這些訊息將隨機選擇。',
keywordDescription: `該組件用於從用戶的問題中提取關鍵字。 Top N指定需要提取的關鍵字數量。`,
@ -1065,6 +1065,9 @@ export default {
addVariable: '新增變數',
variableSettings: '變數設定',
systemPrompt: '系統提示詞',
addCategory: '新增分類',
categoryName: '分類名稱',
nextStep: '下一步',
},
footer: {
profile: '“保留所有權利 @ react”',

View File

@ -719,7 +719,7 @@ export default {
generateDescription: `此组件用于调用LLM生成文本请注意提示的设置。`,
categorizeDescription: `此组件用于对文本进行分类。请指定类别的名称、描述和示例。每个类别都指向不同的下游组件。`,
relevantDescription: `该组件用来判断upstream的输出是否与用户最新的问题相关代表相关代表不相关。`,
rewriteQuestionDescription: `此组件用于细化用户的提问。通常,当用户的原始提问无法从知识库中检索到相关信息时,此组件可帮助您将问题更改为更符合知识库表达方式的适当问题。只有“检索”可作为其下游。`,
rewriteQuestionDescription: `此组件用于细化用户的提问。通常,当用户的原始提问无法从知识库中检索到相关信息时,此组件可帮助您将问题更改为更符合知识库表达方式的适当问题。`,
messageDescription:
'此组件用于向用户发送静态信息。您可以准备几条消息,这些消息将被随机选择。',
keywordDescription: `该组件用于从用户的问题中提取关键词。Top N指定需要提取的关键词数量。`,
@ -1106,9 +1106,9 @@ export default {
minus: '减号',
semicolon: '分号',
},
addVariable: '新增变量',
variableSettings: '变量设置',
systemPrompt: '系统提示词',
addCategory: '新增分类',
categoryName: '分类名称',
nextStep: '下一步',
},
footer: {
profile: 'All rights reserved @ React',

View File

@ -298,9 +298,7 @@ export const componentMenuList = [
{
name: Operator.Message,
},
{
name: Operator.Relevant,
},
{
name: Operator.RewriteQuestion,
},
@ -428,7 +426,6 @@ export const initialGenerateValues = {
export const initialRewriteQuestionValues = {
...initialLlmBaseValues,
loop: 1,
};
export const initialRelevantValues = {

View File

@ -138,7 +138,7 @@ const DynamicCategorize = ({ nodeId }: IProps) => {
}
>
<Form.Item
label={t('name')}
label={t('categoryName')}
name={[field.name, 'name']}
validateTrigger={['onChange', 'onBlur']}
rules={[
@ -178,7 +178,7 @@ const DynamicCategorize = ({ nodeId }: IProps) => {
>
<Input.TextArea rows={3} />
</Form.Item>
<Form.Item label={t('to')} name={[field.name, 'to']}>
<Form.Item label={t('nextStep')} name={[field.name, 'to']}>
<Select
allowClear
options={buildCategorizeToOptions(
@ -199,7 +199,7 @@ const DynamicCategorize = ({ nodeId }: IProps) => {
className={styles.addButton}
icon={<PlusOutlined />}
>
{t('addItem')}
{t('addCategory')}
</Button>
</Flex>
);

View File

@ -1,10 +1,10 @@
import { RAGFlowNodeType } from '@/interfaces/database/flow';
import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
import { Button, Collapse, Flex, Form, Input, Select } from 'antd';
import { PropsWithChildren, useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { useBuildComponentIdSelectOptions } from '../../hooks/use-get-begin-query';
import { RAGFlowNodeType } from '../../interface';
import styles from './index.less';
interface IProps {
@ -29,7 +29,7 @@ const DynamicVariableForm = ({ node }: IProps) => {
const options = [
{ value: VariableType.Reference, label: t('flow.reference') },
{ value: VariableType.Input, label: t('flow.input') },
{ value: VariableType.Input, label: t('flow.text') },
];
const handleTypeChange = useCallback(

View File

@ -1,6 +1,6 @@
import LLMSelect from '@/components/llm-select';
import { useTranslate } from '@/hooks/common-hooks';
import { Form, InputNumber } from 'antd';
import { Form } from 'antd';
import { IOperatorForm } from '../../interface';
const RewriteQuestionForm = ({ onValuesChange, form }: IOperatorForm) => {
@ -22,13 +22,6 @@ const RewriteQuestionForm = ({ onValuesChange, form }: IOperatorForm) => {
>
<LLMSelect></LLMSelect>
</Form.Item>
<Form.Item
label={t('loop', { keyPrefix: 'flow' })}
name="loop"
initialValue={1}
>
<InputNumber />
</Form.Item>
</Form>
);
};