From c1699b4193dc7862ade0fa43bfbb86df9058c4f3 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Tue, 14 Mar 2023 16:24:24 +0200 Subject: [PATCH] Remove looping in oobabooga's API --- public/script.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/script.js b/public/script.js index f62df6f89..8b9a489ab 100644 --- a/public/script.js +++ b/public/script.js @@ -1583,8 +1583,9 @@ $(document).ready(function () { getMessage = data.results[0].text; } else if (main_api == 'textgenerationwebui') { getMessage = data.data[0]; - if (getMessage == null) { - runGenerate(""); + if (getMessage == null || data.error) { + popup_type = 'default'; + callPopup('

Got empty response from Text generation web UI. Try restarting the API with recommended options.

'); return; } getMessage = getMessage.substring(finalPromt.length);