请问解决了吗
分块传输不触发onChunkReceivedhttps://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/extended/component-plus/uploader.html const requestTask = Taro.request({ url: `${app.chatUrl}/conversation/talk`, method: "POST", enableChunked: true, responseType: "text", data: { prompt: requestQuestion, message_id: uuid(), parent_message_id: uuid(), stream: true, user_id: user_id, }, success: response => { // 开启enableChunked后,成功的回调一般用不到,因为响应数据不在这里返回 console.log(response) } }); console.log(``, requestTask); requestTask.onChunkReceived(function (response) { console.log(1) const arrayBuffer = response.data; const uint8Array = new Uint8Array(arrayBuffer); let text = String.fromCharCode.apply(null, uint8Array); console.log(`text`, text); if (text.trim() === "data: [DONE]") { setLoading(false); return; } const datas = text.split("data:"); datas.shift(); for (let i = 0; i < datas.length; i++) { const part = datas[i]; console.log(`part`, part); const datatxt = part.trim(); if (datatxt === "[DONE]") { setLoading(false); return; } else { const data = JSON.parse(datatxt); setAnswer(data.message.content.parts[0]); } } }); s数据是正常返回的,但是不触发onChunkReceived HTTP/1.1 200 transfer-encoding: chunked transfer-encoding: chunked date: Mon, 17 Jul 2023 10:08:20 GMT for-weapp-devtools: {"transfer-encoding":["chunked","chunked"],"date":["Mon, 17 Jul 2023 10:08:20 GMT"]} z这是返回头
04-06