Hey there, thanks so much for releasing this -- much appreciated!
I'm having a bit of trouble rendering multiple message responses I'm receiving from my backend.
Here's my Vue template code:
<deep-chat
:demo="true"
:initialMessages="thread.messages"
:request="{
handler: sendMessage
}"
/>
And here's my sendMessage
helper function, which attempts to fire off multiple signals:
const sendMessage = async (body, signals) => {
try {
const response = await useRequest(`/threads/${thread.value.id}/message/`, {
method: 'POST',
body: {
message: body.messages[0].text,
}
})
response.forEach((message) => {
signals.onResponse(message)
})
} catch (e) {
useErrorHandler(e)
}
}
This only ever prints the first message, I assume signals.onResponse
is only ever meant to be called once? It's not apparent to me how to make this call multiple times.. probably missing something very simple, appreciate any help, thanks!
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too