Remove looping in oobabooga's API

This commit is contained in:
SillyLossy
2023-03-14 16:24:24 +02:00
parent 4488110ea0
commit c1699b4193

View File

@ -1583,8 +1583,9 @@ $(document).ready(function () {
getMessage = data.results[0].text; getMessage = data.results[0].text;
} else if (main_api == 'textgenerationwebui') { } else if (main_api == 'textgenerationwebui') {
getMessage = data.data[0]; getMessage = data.data[0];
if (getMessage == null) { if (getMessage == null || data.error) {
runGenerate(""); popup_type = 'default';
callPopup('<h3>Got empty response from Text generation web UI. Try restarting the API with recommended options.</h3>');
return; return;
} }
getMessage = getMessage.substring(finalPromt.length); getMessage = getMessage.substring(finalPromt.length);