WIP: fix: fix abort messages and continue conversation on abort

feat(askOpenAI.js): add abort endpoint to cancel requests
feat(MessageHandler): add abort functionality to cancel requests
feat(submission.js): add lastResponse and source atoms to store
feat(handleSubmit.js): add stopGenerating function to cancel requests
This commit is contained in:
Daniel Avila 2023-04-08 23:19:29 -04:00
parent 5fbefa15ce
commit 88aea81288
5 changed files with 88 additions and 12 deletions

View file

@ -138,7 +138,8 @@ const useMessageHandler = () => {
};
const stopGenerating = () => {
setSubmission(null);
// setSubmission(null);
setSubmission(prev => ({ ...prev, cancel: true }));
};
return { ask, regenerate, stopGenerating };