fix: add a todo

This commit is contained in:
ikechan8370 2023-03-20 23:05:26 +08:00
parent f4a94f61db
commit ef54cad1fd

View file

@ -93,6 +93,7 @@ export class OfficialChatGPTClient {
let body = await res.json()
throw new Error(JSON.stringify(body, null, 2))
}
// todo accept as stream
const decoder = new TextDecoder('utf-8')
const bodyBytes = await res.arrayBuffer()
const bodyText = decoder.decode(bodyBytes)