diff --git a/smartassist/src/static/js/frontend.js b/smartassist/src/static/js/frontend.js index 39b5948..8738ad7 100644 --- a/smartassist/src/static/js/frontend.js +++ b/smartassist/src/static/js/frontend.js @@ -53,6 +53,12 @@ const frontendApi = { // Append the message element to the chatbox immediately chatbox.appendChild(messageElement); }, + // Set the endpoint and LLM variables + setEndpointAndLlm: function(endpoint, llm) { + window.endpoint = endpoint; + window.llm = llm; + console.log(`Selected Endpoint: ${endpoint}, LLM: ${llm}`); + }, }; // Wait for the event listener to set apiEndpoint and useModel @@ -82,3 +88,4 @@ document.addEventListener('keydown', function(event) { document.addEventListener('keyup', function() { sendButton.style.backgroundColor = ''; // Restore the original style when any key is released }); +