chore: modified handleQuestion to favor "Retry" action after a failed response generation

pull/988/head
utin-francis-peter 4 weeks ago
parent f7a1874cb3
commit 0b09c00b50

@ -80,11 +80,11 @@ export default function Conversation() {
});
};
const handleQuestion = (question: string) => {
const handleQuestion = (question: string, isRetry = false) => {
question = question.trim();
if (question === '') return;
setEventInterrupt(false);
dispatch(addQuery({ prompt: question }));
!isRetry && dispatch(addQuery({ prompt: question })); //dispatch only new queries
fetchStream.current = dispatch(fetchAnswer({ question }));
};
const handleFeedback = (query: Query, feedback: FEEDBACK, index: number) => {

Loading…
Cancel
Save