From f1ef23285ae6e63d5fb28f5e271fec0e40ad65f2 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Mon, 18 Nov 2024 15:41:45 +0100 Subject: Fix load model list i AirforceChat provider Add Microsoft Copilot provider Show image support in the model list of the gui --- g4f/gui/client/static/js/chat.v1.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'g4f/gui/client/static') diff --git a/g4f/gui/client/static/js/chat.v1.js b/g4f/gui/client/static/js/chat.v1.js index 42ddb129..580cbf77 100644 --- a/g4f/gui/client/static/js/chat.v1.js +++ b/g4f/gui/client/static/js/chat.v1.js @@ -1367,7 +1367,8 @@ async function load_provider_models(providerIndex=null) { modelProvider.classList.remove("hidden"); models.forEach((model) => { let option = document.createElement('option'); - option.value = option.text = model.model; + option.value = model.model; + option.text = `${model.model}${model.image ? " (Image Generation)" : ""}${model.vision ? " (Image Upload)" : ""}`; option.selected = model.default; modelProvider.appendChild(option); }); @@ -1381,7 +1382,7 @@ providerSelect.addEventListener("change", () => load_provider_models()); function save_storage() { let filename = `chat ${new Date().toLocaleString()}.json`.replaceAll(":", "-"); let data = {"options": {"g4f": ""}}; - for (let i = 0; i < appStorage.length; i++){ + for (let i = 0; i < appStorage.length; i++){label let key = appStorage.key(i); let item = appStorage.getItem(key); if (key.startsWith("conversation:")) { -- cgit v1.2.3