New switcher

This commit is contained in:
Alex
2023-02-07 01:17:45 +00:00
parent 4bbc7ee1a0
commit 2e26980422
9 changed files with 95 additions and 318 deletions

View File

@@ -20,7 +20,9 @@ if (el) {
'Content-Type': 'application/json',
},
body: JSON.stringify({question: message, api_key: localStorage.getItem('apiKey')}),
body: JSON.stringify({question: message,
api_key: localStorage.getItem('apiKey'),
active_docs: localStorage.getItem('activeDocs'),}),
})
.then(response => response.json())
.then(data => {

View File

@@ -0,0 +1,3 @@
document.getElementById("select-docs").addEventListener("change", function() {
localStorage.setItem('activeDocs', this.value)
});