minorfix-3

This commit is contained in:
Alex
2023-02-07 22:42:59 +00:00
parent b480917dc6
commit ac7cc26022
2 changed files with 4 additions and 6 deletions

View File

@@ -13,6 +13,9 @@ if (el) {
document.getElementById("message-input").value = "";
document.getElementById("button-submit").innerHTML = '<i class="fa fa-circle-o-notch fa-spin"></i> Thinking...';
document.getElementById("button-submit").disabled = true;
if (localStorage.getItem('activeDocs') == null) {
localStorage.setItem('activeDocs', 'default')
}
fetch('/api/answer', {
method: 'POST',
@@ -22,7 +25,7 @@ if (el) {
body: JSON.stringify({question: message,
api_key: localStorage.getItem('apiKey'),
active_docs: localStorage.getItem('activeDocs'),}),
active_docs: localStorage.getItem('activeDocs')}),
})
.then(response => response.json())
.then(data => {