forked from open-webui/open-webui
feat: no text response error message
This commit is contained in:
parent
ee83791596
commit
892591f894
2 changed files with 14 additions and 0 deletions
|
@ -245,6 +245,13 @@
|
|||
}
|
||||
} else {
|
||||
responseMessage.done = true;
|
||||
|
||||
if (responseMessage.content == '') {
|
||||
responseMessage.error = true;
|
||||
responseMessage.content =
|
||||
'Oops! No text generated from Ollama, Please try again.';
|
||||
}
|
||||
|
||||
responseMessage.context = data.context ?? null;
|
||||
responseMessage.info = {
|
||||
total_duration: data.total_duration,
|
||||
|
|
|
@ -259,6 +259,13 @@
|
|||
}
|
||||
} else {
|
||||
responseMessage.done = true;
|
||||
|
||||
if (responseMessage.content == '') {
|
||||
responseMessage.error = true;
|
||||
responseMessage.content =
|
||||
'Oops! No text generated from Ollama, Please try again.';
|
||||
}
|
||||
|
||||
responseMessage.context = data.context ?? null;
|
||||
responseMessage.info = {
|
||||
total_duration: data.total_duration,
|
||||
|
|
Loading…
Reference in a new issue