forked from XiaoMo/ChatGPT-Next-Web
fixup: decode in stream mode
This commit is contained in:
parent
4618c624c8
commit
9e602eb575
@ -94,7 +94,7 @@ export class ChatGPTApi implements LLMApi {
|
||||
return finish();
|
||||
}
|
||||
|
||||
const chunk = decoder.decode(value);
|
||||
const chunk = decoder.decode(value, { stream: true });
|
||||
const lines = chunk.split("data: ");
|
||||
|
||||
for (const line of lines) {
|
||||
|
Loading…
Reference in New Issue
Block a user