mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-20 02:31:08 +08:00
fixup: decode in stream mode
This commit is contained in:
@@ -94,7 +94,7 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
return finish();
|
return finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
const chunk = decoder.decode(value);
|
const chunk = decoder.decode(value, { stream: true });
|
||||||
const lines = chunk.split("data: ");
|
const lines = chunk.split("data: ");
|
||||||
|
|
||||||
for (const line of lines) {
|
for (const line of lines) {
|
||||||
|
Reference in New Issue
Block a user