Commit 618456f2 authored by 박민석's avatar 박민석

update api

parent a39d83db
Pipeline #21100 passed with stages
in 3 minutes and 47 seconds
...@@ -189,24 +189,23 @@ ...@@ -189,24 +189,23 @@
body: JSON.stringify(payload), body: JSON.stringify(payload),
}) })
.then((response) => { .then((response) => {
// const reader = response.body?.getReader() const reader = response.body?.getReader()
// const decoder = new TextDecoder('utf-8') const decoder = new TextDecoder('utf-8')
// function readStream () { function readStream () {
// return reader?.read().then(({ done, value }) => { return reader?.read().then(({ done, value }) => {
// if (done) { if (done) {
// isLoading = false isLoading = false
// return return
// } }
// const chunk = decoder.decode(value, { stream: true }) const chunk = decoder.decode(value, { stream: true })
// messageItem.textContent += chunk messageItem.textContent += chunk
// chatBody.scrollTop = chatBody?.scrollHeight chatBody.scrollTop = chatBody?.scrollHeight
// return readStream() return readStream()
// }) })
// } }
// return readStream() return readStream()
console.log(response)
}) })
.catch((error) => { .catch((error) => {
console.error('Chatbot Error', 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