diff --git a/web/app/components/base/chat/chat-with-history/config-panel/form.tsx b/web/app/components/base/chat/chat-with-history/config-panel/form.tsx index 0b8b4dc0bb..5509d6ff04 100644 --- a/web/app/components/base/chat/chat-with-history/config-panel/form.tsx +++ b/web/app/components/base/chat/chat-with-history/config-panel/form.tsx @@ -74,7 +74,7 @@ const Form = () => { allowed_file_types: appParams?.file_upload?.allowed_file_types, allowed_file_extensions: appParams?.file_upload?.allowed_file_extensions, allowed_file_upload_methods: appParams?.file_upload?.allowed_file_upload_methods, - number_limits: appParams?.file_upload?.number_limits, + number_limits: appParams?.file_upload?.max_length, }} /> ) diff --git a/web/app/components/base/chat/embedded-chatbot/config-panel/form.tsx b/web/app/components/base/chat/embedded-chatbot/config-panel/form.tsx index 19a8aa7c49..64ef308e91 100644 --- a/web/app/components/base/chat/embedded-chatbot/config-panel/form.tsx +++ b/web/app/components/base/chat/embedded-chatbot/config-panel/form.tsx @@ -1,4 +1,3 @@ -import { useCallback } from 'react' import { useTranslation } from 'react-i18next' import { useEmbeddedChatbotContext } from '../context' import Input from './form-input' @@ -17,12 +16,12 @@ const Form = () => { isMobile, } = useEmbeddedChatbotContext() - const handleFormChange = useCallback((variable: string, value: any) => { + const handleFormChange = (variable: string, value: any) => { handleNewConversationInputsChange({ ...newConversationInputsRef.current, [variable]: value, }) - }, [newConversationInputs, handleNewConversationInputsChange]) + } const renderField = (form: any) => { const { @@ -87,7 +86,7 @@ const Form = () => { allowed_file_types: appParams?.file_upload?.allowed_file_types, allowed_file_extensions: appParams?.file_upload?.allowed_file_extensions, allowed_file_upload_methods: appParams?.file_upload?.allowed_file_upload_methods, - number_limits: appParams?.file_upload?.number_limits, + number_limits: appParams?.file_upload?.max_length, }} /> )