Skip to content

Commit

Permalink
Feat: Add the MessageHistoryWindowSizeItem to RewriteQuestionForm #1739
Browse files Browse the repository at this point in the history
… (#4502)

### 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)
  • Loading branch information
cike8899 authored Jan 16, 2025
1 parent 3805621 commit 39be08c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion web/src/pages/flow/constant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ export const initialGenerateValues = {

export const initialRewriteQuestionValues = {
...initialLlmBaseValues,
message_history_window_size: 6,
};

export const initialRelevantValues = {
Expand All @@ -445,7 +446,7 @@ export const initialMessageValues = {

export const initialKeywordExtractValues = {
...initialLlmBaseValues,
top_n: 1,
top_n: 3,
...initialQueryBaseValues,
};
export const initialDuckValues = {
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/flow/form/keyword-extract-form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const KeywordExtractForm = ({ onValuesChange, form, node }: IOperatorForm) => {
>
<LLMSelect></LLMSelect>
</Form.Item>
<TopNItem initialValue={1}></TopNItem>
<TopNItem initialValue={3}></TopNItem>
</Form>
);
};
Expand Down
8 changes: 6 additions & 2 deletions web/src/pages/flow/form/rewrite-question-form/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
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 { IOperatorForm } from '../../interface';
Expand All @@ -9,8 +10,8 @@ const RewriteQuestionForm = ({ onValuesChange, form }: IOperatorForm) => {
return (
<Form
name="basic"
labelCol={{ span: 4 }}
wrapperCol={{ span: 20 }}
labelCol={{ span: 8 }}
wrapperCol={{ span: 16 }}
onValuesChange={onValuesChange}
autoComplete="off"
form={form}
Expand All @@ -22,6 +23,9 @@ const RewriteQuestionForm = ({ onValuesChange, form }: IOperatorForm) => {
>
<LLMSelect></LLMSelect>
</Form.Item>
<MessageHistoryWindowSizeItem
initialValue={6}
></MessageHistoryWindowSizeItem>
</Form>
);
};
Expand Down

0 comments on commit 39be08c

Please sign in to comment.