mirror of
https://github.com/open-webui/open-webui
synced 2025-01-01 08:42:14 +00:00
refac
This commit is contained in:
parent
da7fa09053
commit
c16896e96d
@ -1065,8 +1065,10 @@
|
|||||||
|
|
||||||
if (choices) {
|
if (choices) {
|
||||||
if (choices[0]?.message?.content) {
|
if (choices[0]?.message?.content) {
|
||||||
|
// Non-stream response
|
||||||
message.content += choices[0]?.message?.content;
|
message.content += choices[0]?.message?.content;
|
||||||
} else {
|
} else {
|
||||||
|
// Stream response
|
||||||
let value = choices[0]?.delta?.content ?? '';
|
let value = choices[0]?.delta?.content ?? '';
|
||||||
if (message.content == '' && value == '\n') {
|
if (message.content == '' && value == '\n') {
|
||||||
console.log('Empty response');
|
console.log('Empty response');
|
||||||
|
Loading…
Reference in New Issue
Block a user