Commit a39d83db authored by 박민석's avatar 박민석

rollback

parent 93b93bf2
Pipeline #21093 passed with stages
in 3 minutes and 45 seconds
......@@ -189,23 +189,24 @@
body: JSON.stringify(payload),
})
.then((response) => {
const reader = response.body?.getReader()
const decoder = new TextDecoder('utf-8')
// const reader = response.body?.getReader()
// const decoder = new TextDecoder('utf-8')
function readStream () {
return reader?.read().then(({ done, value }) => {
if (done) {
isLoading = false
return
}
const chunk = decoder.decode(value, { stream: true })
messageItem.textContent += chunk
chatBody.scrollTop = chatBody?.scrollHeight
return readStream()
})
}
return readStream()
// function readStream () {
// return reader?.read().then(({ done, value }) => {
// if (done) {
// isLoading = false
// return
// }
// const chunk = decoder.decode(value, { stream: true })
// messageItem.textContent += chunk
// chatBody.scrollTop = chatBody?.scrollHeight
// return readStream()
// })
// }
// return readStream()
console.log(response)
})
.catch((error) => {
console.error('Chatbot Error', error)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment