This commit is contained in:
Timothy Jaeryang Baek 2024-12-25 22:23:59 -08:00
parent da7fa09053
commit c16896e96d

View File

@ -1065,8 +1065,10 @@
if (choices) {
if (choices[0]?.message?.content) {
// Non-stream response
message.content += choices[0]?.message?.content;
} else {
// Stream response
let value = choices[0]?.delta?.content ?? '';
if (message.content == '' && value == '\n') {
console.log('Empty response');