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
commit 42711d76d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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