mirror of
https://github.com/arc53/DocsGPT
synced 2024-11-17 21:26:26 +00:00
chore: modified handleQuestion to favor "Retry" action after a failed response generation
This commit is contained in:
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…
Reference in New Issue
Block a user