Merge pull request #384 from ArnabBCA/main

Fixed Empty Spaces Passed in the Input Field
This commit is contained in:
Alex
2023-10-05 00:10:51 +01:00
committed by GitHub

View File

@@ -61,6 +61,8 @@ export default function Conversation() {
};
const handleQuestion = (question: string) => {
question = question.trim();
if (question === '') return;
dispatch(addQuery({ prompt: question }));
dispatch(fetchAnswer({ question }));
};