Skip to content

Commit

Permalink
Front-End: Disallow invalid user input
Browse files Browse the repository at this point in the history
  • Loading branch information
ChloeYeung committed Aug 17, 2024
1 parent 0ddfdb3 commit 6ce330c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Front-End/src/views/chatgpt/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ const ChatGptIndex = () => {
// desireAiEngine only be used when data-chaining happens, if input is from input filed, desireAiEngine will he undefined
const handleMessageInput = async (inputFromUser, desireAiEngine, hiddenFromUser, inputType, extraConfigPdfTransLanguage, messageChaining) => {

// Stop invalid user input
if(!inputFromUser) return

// Set active before processing
setInputHandlingActive(true);
setLoadingStage('loading');
Expand Down

0 comments on commit 6ce330c

Please sign in to comment.