[bugfix] can not read the last sentence
This commit is contained in:
@@ -114,7 +114,7 @@ class ChatSseService {
|
|||||||
if (line.startsWith('data:')) {
|
if (line.startsWith('data:')) {
|
||||||
final jsonStr = line.substring(5).trim();
|
final jsonStr = line.substring(5).trim();
|
||||||
if (jsonStr == '[DONE]' || jsonStr.contains('message_end')) {
|
if (jsonStr == '[DONE]' || jsonStr.contains('message_end')) {
|
||||||
await processBuffer(isChinese);
|
TtsUtil.complete();
|
||||||
onStreamResponse(messageId, responseText, true);
|
onStreamResponse(messageId, responseText, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user