diff --git a/public/script.js b/public/script.js index 4c22c2ccf..58daa02c4 100644 --- a/public/script.js +++ b/public/script.js @@ -3777,11 +3777,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, } reject(exception); - $("#send_textarea").removeAttr('disabled'); - is_send_press = false; - activateSendButtons(); - showSwipeButtons(); - setGenerationProgress(0); + unblockGeneration(); console.log(exception); streamingProcessor = null; }; diff --git a/public/scripts/horde.js b/public/scripts/horde.js index 37a59185c..50819f688 100644 --- a/public/scripts/horde.js +++ b/public/scripts/horde.js @@ -31,8 +31,8 @@ let horde_settings = { trusted_workers_only: false, }; -const MAX_RETRIES = 240; -const CHECK_INTERVAL = 5000; +const MAX_RETRIES = 480; +const CHECK_INTERVAL = 2500; const MIN_LENGTH = 16; const getRequestArgs = () => ({ method: "GET", @@ -152,7 +152,7 @@ async function generateHorde(prompt, params, signal, reportProgress) { for (let retryNumber = 0; retryNumber < MAX_RETRIES; retryNumber++) { if (signal.aborted) { - await fetch(`https://horde.koboldai.net/api/v2/generate/text/status/${task_id}`, { + fetch(`https://horde.koboldai.net/api/v2/generate/text/status/${task_id}`, { method: 'DELETE', headers: { "Client-Agent": CLIENT_VERSION,