summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-06-21 21:26:18 +0800
committerGitHub <noreply@github.com>2024-06-21 21:26:18 +0800
commitf2378e172548f3357fca6e561803bfe3a013bcb3 (patch)
treee79a9253ec845d16fc4596f377c5515f45a104e9 /assets
parent054e998ff49a1f3abbc0a474d9a8d23c0ed4b17b (diff)
downloadaichat-f2378e172548f3357fca6e561803bfe3a013bcb3.tar.gz
refactor: rename model.mode to model.type (#625)
Diffstat (limited to 'assets')
-rw-r--r--assets/arena.html2
-rw-r--r--assets/playground.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/assets/arena.html b/assets/arena.html
index 9808084..f0c93e5 100644
--- a/assets/arena.html
+++ b/assets/arena.html
@@ -565,7 +565,7 @@
async init() {
try {
const models = await fetchJSON(MODELS_API);
- this.models = models.filter(v => !v.mode || v.mode === "chat");
+ this.models = models.filter(v => !v.type || v.type === "chat");
} catch (err) {
toast("No available model");
console.error("Failed to load models", err);
diff --git a/assets/playground.html b/assets/playground.html
index 6ef1f1a..72c1e3e 100644
--- a/assets/playground.html
+++ b/assets/playground.html
@@ -741,7 +741,7 @@
async init() {
await Promise.all([
fetchJSON(MODELS_API).then(models => {
- this.models = models.filter(v => !v.mode || v.mode === "chat");
+ this.models = models.filter(v => !v.type || v.type === "chat");
}).catch(err => {
toast("No model available");
console.error("Failed to load models", err);