Why does the returned content often contain '�'
walker-peng22 opened this issue · comments
Ernie Dubrow commented
Verify latest release
- I verified that the issue exists in the latest
chatgpt
release
Verify webapp is working
- I verify that the ChatGPT webapp is working properly for this account.
Environment details
chatgpt: "^5.2.4"
node: v18.15.0
macos
Describe the Bug
I use onProgress to return a stream, but the content often contains '�'. Is the encoding format incorrect?
const res = await this.chatGPTProvider.sendMessage(searchDto.content, {
systemMessage: '首选用中文回复',
parentMessageId,
onProgress: (partialResponse) => {
if (partialResponse.delta) {
response.write(partialResponse.delta);
}
},
});