Skip to content

Commit

Permalink
answer_done event
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan-Adly committed Oct 3, 2023
1 parent f66ff7a commit 8f0220b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions templates/listening.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ <h1>Channel Name: {{channel_name}}</h1>
channel.bind("answer", function (data) {
document.getElementById("answer").innerHTML += data.text;
});

//optional, allows you to render clean html (instead of markdown), once
// the answer is complete
// you will not get this if the answer is cached
channel.bind("answer_done", function (data) {

document.getElementById("answer").innerHTML = data.text;
});

// context
channel.bind("context", function (data) {
Expand Down

0 comments on commit 8f0220b

Please sign in to comment.