mirror of
https://github.com/open-webui/open-webui
synced 2025-01-30 14:29:55 +00:00
fix: openai notification issue
This commit is contained in:
parent
5ef478a154
commit
5b01d7994a
@ -951,27 +951,27 @@
|
|||||||
messages = messages;
|
messages = messages;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($settings.notificationEnabled && !document.hasFocus()) {
|
|
||||||
const notification = new Notification(`OpenAI ${model}`, {
|
|
||||||
body: responseMessage.content,
|
|
||||||
icon: `${WEBUI_BASE_URL}/static/favicon.png`
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($settings.responseAutoCopy) {
|
|
||||||
copyToClipboard(responseMessage.content);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($settings.responseAutoPlayback) {
|
|
||||||
await tick();
|
|
||||||
document.getElementById(`speak-button-${responseMessage.id}`)?.click();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (autoScroll) {
|
if (autoScroll) {
|
||||||
scrollToBottom();
|
scrollToBottom();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($settings.notificationEnabled && !document.hasFocus()) {
|
||||||
|
const notification = new Notification(`OpenAI ${model}`, {
|
||||||
|
body: responseMessage.content,
|
||||||
|
icon: `${WEBUI_BASE_URL}/static/favicon.png`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($settings.responseAutoCopy) {
|
||||||
|
copyToClipboard(responseMessage.content);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($settings.responseAutoPlayback) {
|
||||||
|
await tick();
|
||||||
|
document.getElementById(`speak-button-${responseMessage.id}`)?.click();
|
||||||
|
}
|
||||||
|
|
||||||
if (lastUsage) {
|
if (lastUsage) {
|
||||||
responseMessage.info = { ...lastUsage, openai: true };
|
responseMessage.info = { ...lastUsage, openai: true };
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user