balibabu
commited on
Commit
·
e7d6550
1
Parent(s):
3f95476
Feat: Add the MessageHistoryWindowSizeItem to RewriteQuestionForm #1739 (#4502)
Browse files### What problem does this PR solve?
Feat: Add the MessageHistoryWindowSizeItem to RewriteQuestionForm #1739
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
web/src/pages/flow/constant.tsx
CHANGED
@@ -426,6 +426,7 @@ export const initialGenerateValues = {
|
|
426 |
|
427 |
export const initialRewriteQuestionValues = {
|
428 |
...initialLlmBaseValues,
|
|
|
429 |
};
|
430 |
|
431 |
export const initialRelevantValues = {
|
@@ -445,7 +446,7 @@ export const initialMessageValues = {
|
|
445 |
|
446 |
export const initialKeywordExtractValues = {
|
447 |
...initialLlmBaseValues,
|
448 |
-
top_n:
|
449 |
...initialQueryBaseValues,
|
450 |
};
|
451 |
export const initialDuckValues = {
|
|
|
426 |
|
427 |
export const initialRewriteQuestionValues = {
|
428 |
...initialLlmBaseValues,
|
429 |
+
message_history_window_size: 6,
|
430 |
};
|
431 |
|
432 |
export const initialRelevantValues = {
|
|
|
446 |
|
447 |
export const initialKeywordExtractValues = {
|
448 |
...initialLlmBaseValues,
|
449 |
+
top_n: 3,
|
450 |
...initialQueryBaseValues,
|
451 |
};
|
452 |
export const initialDuckValues = {
|
web/src/pages/flow/form/keyword-extract-form/index.tsx
CHANGED
@@ -24,7 +24,7 @@ const KeywordExtractForm = ({ onValuesChange, form, node }: IOperatorForm) => {
|
|
24 |
>
|
25 |
<LLMSelect></LLMSelect>
|
26 |
</Form.Item>
|
27 |
-
<TopNItem initialValue={
|
28 |
</Form>
|
29 |
);
|
30 |
};
|
|
|
24 |
>
|
25 |
<LLMSelect></LLMSelect>
|
26 |
</Form.Item>
|
27 |
+
<TopNItem initialValue={3}></TopNItem>
|
28 |
</Form>
|
29 |
);
|
30 |
};
|
web/src/pages/flow/form/rewrite-question-form/index.tsx
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import LLMSelect from '@/components/llm-select';
|
|
|
2 |
import { useTranslate } from '@/hooks/common-hooks';
|
3 |
import { Form } from 'antd';
|
4 |
import { IOperatorForm } from '../../interface';
|
@@ -9,8 +10,8 @@ const RewriteQuestionForm = ({ onValuesChange, form }: IOperatorForm) => {
|
|
9 |
return (
|
10 |
<Form
|
11 |
name="basic"
|
12 |
-
labelCol={{ span:
|
13 |
-
wrapperCol={{ span:
|
14 |
onValuesChange={onValuesChange}
|
15 |
autoComplete="off"
|
16 |
form={form}
|
@@ -22,6 +23,9 @@ const RewriteQuestionForm = ({ onValuesChange, form }: IOperatorForm) => {
|
|
22 |
>
|
23 |
<LLMSelect></LLMSelect>
|
24 |
</Form.Item>
|
|
|
|
|
|
|
25 |
</Form>
|
26 |
);
|
27 |
};
|
|
|
1 |
import LLMSelect from '@/components/llm-select';
|
2 |
+
import MessageHistoryWindowSizeItem from '@/components/message-history-window-size-item';
|
3 |
import { useTranslate } from '@/hooks/common-hooks';
|
4 |
import { Form } from 'antd';
|
5 |
import { IOperatorForm } from '../../interface';
|
|
|
10 |
return (
|
11 |
<Form
|
12 |
name="basic"
|
13 |
+
labelCol={{ span: 8 }}
|
14 |
+
wrapperCol={{ span: 16 }}
|
15 |
onValuesChange={onValuesChange}
|
16 |
autoComplete="off"
|
17 |
form={form}
|
|
|
23 |
>
|
24 |
<LLMSelect></LLMSelect>
|
25 |
</Form.Item>
|
26 |
+
<MessageHistoryWindowSizeItem
|
27 |
+
initialValue={6}
|
28 |
+
></MessageHistoryWindowSizeItem>
|
29 |
</Form>
|
30 |
);
|
31 |
};
|