ugh
This commit is contained in:
parent
4f7e00648e
commit
06d954f106
@ -35,7 +35,7 @@ async function readResponse(response) {
|
|||||||
console.log(`Done: ${JSON.stringify(chunk.done)}`);
|
console.log(`Done: ${JSON.stringify(chunk.done)}`);
|
||||||
console.log(`Value: ${new TextDecoder().decode(chunk.value)}`);
|
console.log(`Value: ${new TextDecoder().decode(chunk.value)}`);
|
||||||
if (chunk.value) {
|
if (chunk.value) {
|
||||||
const text = decoder.decode(chunk.value, { stream: true });
|
const text = decoder.decode(chunk.value);
|
||||||
finishedResponse += text;
|
finishedResponse += text;
|
||||||
}
|
}
|
||||||
if (chunk.done) {
|
if (chunk.done) {
|
||||||
|
Loading…
Reference in New Issue
Block a user