From dc209b3595b9285fa171d350dc75e14e4a73693f Mon Sep 17 00:00:00 2001 From: Joakim Persson Date: Mon, 5 Aug 2024 16:59:58 +0200 Subject: [PATCH] Lade till setEndpointAndLlm() till frontendApi() --- smartassist/src/static/js/frontend.js | 7 +++++++ 1 file changed, 7 insertions(+) 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 }); +