summaryrefslogtreecommitdiffstats
path: root/assets/playground.html
diff options
context:
space:
mode:
Diffstat (limited to 'assets/playground.html')
-rw-r--r--assets/playground.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/assets/playground.html b/assets/playground.html
index 420c679..d8c33f7 100644
--- a/assets/playground.html
+++ b/assets/playground.html
@@ -178,6 +178,7 @@
.chat-message {
display: flex;
padding: 0.7rem;
+ margin-bottom: 0.7rem;
}
.chat-avatar svg {
@@ -247,7 +248,7 @@
.message-toolbox {
display: flex;
position: absolute;
- bottom: -1.25rem;
+ bottom: -1.4rem;
}
.copy-message-btn,
@@ -1193,6 +1194,9 @@
function estimateTokenLength(input) {
let tokenLength = 0;
+ if (Array.isArray(input)) {
+ input = input.map(v => v.text || "").join("");
+ }
for (let i = 0; i < input.length; i++) {
const charCode = input.charCodeAt(i);