From 4522d3cbae85b5a29d3175bd979adf48fa05eef5 Mon Sep 17 00:00:00 2001
From: Cohee <18619528+Cohee1207@users.noreply.github.com>
Date: Tue, 10 Sep 2024 10:25:23 +0000
Subject: [PATCH] Filter null-values from /model selection
---
public/index.html | 22 +++++++++++-----------
public/scripts/slash-commands.js | 2 +-
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/public/index.html b/public/index.html
index 80f29fc4a..61e4c207b 100644
--- a/public/index.html
+++ b/public/index.html
@@ -2071,7 +2071,7 @@
TogetherAI Model
-
+
-- Connect to the API --
@@ -2095,7 +2095,7 @@
OpenRouter Model
-
+
-- Connect to the API --
@@ -2122,7 +2122,7 @@
InfermaticAI Model
-
+
-- Connect to the API --
@@ -2145,7 +2145,7 @@
DreamGen Model
-
+
-- Connect to the API --
@@ -2171,7 +2171,7 @@
Mancer Model
-
+
-- Connect to the API --
@@ -2221,7 +2221,7 @@
For privacy reasons, your API key will be hidden after you reload the page.
-
+
-- Connect to the API --
@@ -2249,7 +2249,7 @@
vLLM Model
-
+
-- Connect to the API --
@@ -2295,7 +2295,7 @@
Aphrodite Model
-
+
-- Connect to the API --
@@ -2338,7 +2338,7 @@
Ollama Model
-
+
-- Connect to the API --
@@ -2376,7 +2376,7 @@
EXPERIMENTAL FEATURE. USE AT YOUR OWN RISK. DON'T ASK FOR SUPPORT ON THIS.
-
+
-- Connect to the API --
@@ -2704,7 +2704,7 @@
OpenRouter Model
- -- Connect to the API --
+ -- Connect to the API --
diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js
index 299211ba8..aa494c366 100644
--- a/public/scripts/slash-commands.js
+++ b/public/scripts/slash-commands.js
@@ -3470,7 +3470,7 @@ function getModelOptions(quiet) {
return nullResult;
}
- const options = Array.from(modelSelectControl.options);
+ const options = Array.from(modelSelectControl.options).filter(x => x.value);
return { control: modelSelectControl, options };
}