diff --git a/web/src/components/message-history-window-size-item.tsx b/web/src/components/message-history-window-size-item.tsx
new file mode 100644
index 0000000000..94da4e8bb5
--- /dev/null
+++ b/web/src/components/message-history-window-size-item.tsx
@@ -0,0 +1,23 @@
+import { Form, InputNumber } from 'antd';
+import { useTranslation } from 'react-i18next';
+
+const MessageHistoryWindowSizeItem = ({
+ initialValue,
+}: {
+ initialValue: number;
+}) => {
+ const { t } = useTranslation('flow');
+
+ return (
+
+
+
+ );
+};
+
+export default MessageHistoryWindowSizeItem;
diff --git a/web/src/pages/flow/constant.tsx b/web/src/pages/flow/constant.tsx
index 9003f50b62..d6065a6b77 100644
--- a/web/src/pages/flow/constant.tsx
+++ b/web/src/pages/flow/constant.tsx
@@ -366,6 +366,7 @@ export const initialRelevantValues = {
export const initialCategorizeValues = {
...initialLlmBaseValues,
+ message_history_window_size: 1,
category_description: {},
};
diff --git a/web/src/pages/flow/form/categorize-form/index.tsx b/web/src/pages/flow/form/categorize-form/index.tsx
index 9e8129f8e1..075dffd4a0 100644
--- a/web/src/pages/flow/form/categorize-form/index.tsx
+++ b/web/src/pages/flow/form/categorize-form/index.tsx
@@ -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 { useSetLlmSetting } from '../../hooks';
@@ -31,6 +32,9 @@ const CategorizeForm = ({ form, onValuesChange, node }: IOperatorForm) => {
>
+
);
diff --git a/web/src/pages/flow/form/generate-form/index.tsx b/web/src/pages/flow/form/generate-form/index.tsx
index 0e36bd4f69..f286169a73 100644
--- a/web/src/pages/flow/form/generate-form/index.tsx
+++ b/web/src/pages/flow/form/generate-form/index.tsx
@@ -1,6 +1,7 @@
import LLMSelect from '@/components/llm-select';
+import MessageHistoryWindowSizeItem from '@/components/message-history-window-size-item';
import { useTranslate } from '@/hooks/common-hooks';
-import { Form, Input, InputNumber, Switch } from 'antd';
+import { Form, Input, Switch } from 'antd';
import { useSetLlmSetting } from '../../hooks';
import { IOperatorForm } from '../../interface';
import DynamicParameters from './dynamic-parameters';
@@ -48,14 +49,9 @@ const GenerateForm = ({ onValuesChange, form, node }: IOperatorForm) => {
>
-
-
-
+ >
);