fixed selected model
This commit is contained in:
@@ -20,7 +20,7 @@ modelInput.addEventListener('input', checkCanIncludeImages);
|
||||
/**
|
||||
* Get the list of chatgpt versions
|
||||
*/
|
||||
function getLastChatGPTVersion() {
|
||||
function getLastChatGPTVersion(selectedModel) {
|
||||
const apiKeySelector = document.querySelector('#apiKey');
|
||||
const selectModel = document.querySelector('#model');
|
||||
|
||||
@@ -49,6 +49,7 @@ function getLastChatGPTVersion() {
|
||||
const opt = document.createElement('option');
|
||||
opt.value = model.id;
|
||||
opt.textContent = model.id;
|
||||
opt.selected = selectedModel && model.id === selectedModel;
|
||||
selectModel.appendChild(opt);
|
||||
}
|
||||
|
||||
|
||||
@@ -84,6 +84,6 @@ chrome.storage.sync.get(['moodleGPT']).then(function (storage) {
|
||||
}
|
||||
|
||||
handleModeChange();
|
||||
getLastChatGPTVersion();
|
||||
getLastChatGPTVersion(config?.model);
|
||||
checkCanIncludeImages();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user