mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-05 13:36:47 +01:00
Better Horde error reporting
This commit is contained in:
parent
3d83d1d5b7
commit
10f27f41d1
@ -153,6 +153,16 @@ async function generateHorde(prompt, params, signal) {
|
||||
const statusCheckJson = await statusCheckResponse.json();
|
||||
console.log(statusCheckJson);
|
||||
|
||||
if (statusCheckJson.faulted === true) {
|
||||
toastr.error('Horde request faulted. Please try again.');
|
||||
throw new Error(`Horde generation failed: Faulted`);
|
||||
}
|
||||
|
||||
if (statusCheckJson.is_possible === false) {
|
||||
toastr.error('There are no Horde workers that are able to generate text with your request. Please change the parameters or try again later.');
|
||||
throw new Error(`Horde generation failed: Unsatisfiable request`);
|
||||
}
|
||||
|
||||
if (statusCheckJson.done && Array.isArray(statusCheckJson.generations) && statusCheckJson.generations.length) {
|
||||
setGenerationProgress(100);
|
||||
const generatedText = statusCheckJson.generations[0].text;
|
||||
|
Loading…
Reference in New Issue
Block a user