Skip to content

Commit

Permalink
fix: webui issue with image (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden committed May 19, 2024
1 parent eaf36cd commit 7f21854
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion assets/arena.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
.chat-message {
display: flex;
padding: 0.7rem;
margin-bottom: 0.7rem;
}

.chat-avatar svg {
Expand Down Expand Up @@ -170,7 +171,7 @@
.message-toolbox {
display: flex;
position: absolute;
bottom: -1.25rem;
bottom: -1.4rem;
}

.copy-message-btn,
Expand Down
6 changes: 5 additions & 1 deletion assets/playground.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
.chat-message {
display: flex;
padding: 0.7rem;
margin-bottom: 0.7rem;
}

.chat-avatar svg {
Expand Down Expand Up @@ -247,7 +248,7 @@
.message-toolbox {
display: flex;
position: absolute;
bottom: -1.25rem;
bottom: -1.4rem;
}

.copy-message-btn,
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7f21854

Please sign in to comment.