Lade till setEndpointAndLlm() till frontendApi()
This commit is contained in:
@@ -53,6 +53,12 @@ const frontendApi = {
|
|||||||
// Append the message element to the chatbox immediately
|
// Append the message element to the chatbox immediately
|
||||||
chatbox.appendChild(messageElement);
|
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
|
// Wait for the event listener to set apiEndpoint and useModel
|
||||||
@@ -82,3 +88,4 @@ document.addEventListener('keydown', function(event) {
|
|||||||
document.addEventListener('keyup', function() {
|
document.addEventListener('keyup', function() {
|
||||||
sendButton.style.backgroundColor = ''; // Restore the original style when any key is released
|
sendButton.style.backgroundColor = ''; // Restore the original style when any key is released
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user