summaryrefslogtreecommitdiffstats
path: root/assets/arena.html
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-12-05 18:19:13 +0800
committerGitHub <noreply@github.com>2024-12-05 18:19:13 +0800
commit8dfcbe1643063dcd4911fd8f61aafa7adfb84a04 (patch)
tree562e3ad946ac81c0bda91ce3cf10c470d524a966 /assets/arena.html
parent3a3388375be05758d5f5574cce1d0f8eb7bdd604 (diff)
downloadaichat-8dfcbe1643063dcd4911fd8f61aafa7adfb84a04.tar.gz
feat: webui playground support multiple sessions in memory (#1035)
Diffstat (limited to 'assets/arena.html')
-rw-r--r--assets/arena.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/assets/arena.html b/assets/arena.html
index e1eec1e..5cfe8f4 100644
--- a/assets/arena.html
+++ b/assets/arena.html
@@ -847,9 +847,9 @@
const chat = this.chats[index];
const messages = [];
for ([userMessage, assistantMessage] of chunkArray(chat.messages, 2)) {
- if (assistantMessage.state == "failed") {
+ if (assistantMessage.state === "failed") {
continue;
- } else if (assistantMessage.state == "loading") {
+ } else if (assistantMessage.state === "loading") {
messages.push({
role: userMessage.role,
content: userMessage.content,
@@ -929,7 +929,7 @@
const parsed = JSON.parse(message);
yield parsed;
} catch {
- if (i == lines.length - 1) {
+ if (i === lines.length - 1) {
reamingChunkValue += line;
break;
}