mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 16:43:16 +00:00
chore: modified handleQuestion to favor "Retry" action after a failed response generation
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user