mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-20 21:41:32 +01:00
Fix smooth streaming for 01.AI
This commit is contained in:
parent
5dba4fa448
commit
ddc3848b26
@ -160,7 +160,7 @@ async function* parseStreamData(json) {
|
||||
return;
|
||||
}
|
||||
// llama.cpp?
|
||||
else if (typeof json.content === 'string' && json.content.length > 0) {
|
||||
else if (typeof json.content === 'string' && json.content.length > 0 && json.object !== 'chat.completion.chunk') {
|
||||
for (let i = 0; i < json.content.length; i++) {
|
||||
const str = json.content[i];
|
||||
yield {
|
||||
|
Loading…
Reference in New Issue
Block a user