This commit is contained in:
Skylar Grant 2025-01-04 10:51:47 -05:00
parent 6ffe15ef9f
commit e2d12044fd

View File

@ -35,9 +35,10 @@ async function readResponse(response) {
if (chunk.value) { if (chunk.value) {
const text = decoder.decode(chunk.value, { stream: true }); const text = decoder.decode(chunk.value, { stream: true });
finishedResponse += text; finishedResponse += text;
outputArea.innerHTML = finishedResponse;
} }
if (chunk.done) { if (chunk.done) {
const responseJSON = JSON.parse(finishedResponse);
console.log(responseJSON);
return; return;
} }
read(); read();