Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
7d88689f
Unverified
Commit
7d88689f
authored
Apr 25, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
Apr 25, 2024
Browse files
Merge pull request #1741 from domsleee/katex-render-performance
fix: Improve katex render performance in responses
parents
02a241f8
dcb92f7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
backend/start_windows.bat
backend/start_windows.bat
+1
-1
src/lib/components/chat/Messages/ResponseMessage.svelte
src/lib/components/chat/Messages/ResponseMessage.svelte
+3
-2
No files found.
backend/start_windows.bat
View file @
7d88689f
...
@@ -7,7 +7,7 @@ SET "SCRIPT_DIR=%~dp0"
...
@@ -7,7 +7,7 @@ SET "SCRIPT_DIR=%~dp0"
cd
/d
"
%SCRIPT_DIR%
"
||
exit
/b
cd
/d
"
%SCRIPT_DIR%
"
||
exit
/b
SET
"KEY_FILE=.webui_secret_key"
SET
"KEY_FILE=.webui_secret_key"
SET
"PORT
=
%PORT
:
8080
%
"
IF
"
%
PORT%
"
==
""
SET
PORT
=
8080
SET
"WEBUI_SECRET_KEY=
%WEBUI_SECRET_KEY%
"
SET
"WEBUI_SECRET_KEY=
%WEBUI_SECRET_KEY%
"
SET
"WEBUI_JWT_SECRET_KEY=
%WEBUI_JWT_SECRET_KEY%
"
SET
"WEBUI_JWT_SECRET_KEY=
%WEBUI_JWT_SECRET_KEY%
"
...
...
src/lib/components/chat/Messages/ResponseMessage.svelte
View file @
7d88689f
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
import { onMount, tick, getContext } from 'svelte';
import { onMount, tick, getContext } from 'svelte';
const i18n = getContext('i18n');
const i18n = getContext('i18n');
let messageElement: HTMLElement;
const dispatch = createEventDispatcher();
const dispatch = createEventDispatcher();
...
@@ -133,7 +134,7 @@
...
@@ -133,7 +134,7 @@
};
};
const renderLatex = () => {
const renderLatex = () => {
let chatMessageElements =
docu
ment.getElementsByClassName('chat-assistant');
let chatMessageElements =
messageEle
ment.getElementsByClassName('chat-assistant');
// let lastChatMessageElement = chatMessageElements[chatMessageElements.length - 1];
// let lastChatMessageElement = chatMessageElements[chatMessageElements.length - 1];
for (const element of chatMessageElements) {
for (const element of chatMessageElements) {
...
@@ -322,7 +323,7 @@
...
@@ -322,7 +323,7 @@
</script>
</script>
{#key message.id}
{#key message.id}
<div class=" flex w-full message-{message.id}">
<div class=" flex w-full message-{message.id}"
bind:this={messageElement}
>
<ProfileImage
<ProfileImage
src={modelfiles[message.model]?.imageUrl ?? `${WEBUI_BASE_URL}/static/favicon.png`}
src={modelfiles[message.model]?.imageUrl ?? `${WEBUI_BASE_URL}/static/favicon.png`}
/>
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment