Merge pull request #1592 from sjnho/main

fix #1590 Render the whole stream response body
This commit is contained in:
Yifei Zhang
2023-05-18 10:38:56 +08:00
committed by GitHub

View File

@@ -99,7 +99,9 @@ export class ChatGPTApi implements LLMApi {
if ( if (
!res.ok || !res.ok ||
res.headers.get("content-type") !== EventStreamContentType || !res.headers
.get("content-type")
?.startsWith(EventStreamContentType) ||
res.status !== 200 res.status !== 200
) { ) {
const responseTexts = [responseText]; const responseTexts = [responseText];