mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
feat: show current running models
This commit is contained in:
@@ -2,7 +2,16 @@
|
||||
import { io } from 'socket.io-client';
|
||||
|
||||
import { onMount, tick, setContext } from 'svelte';
|
||||
import { config, user, theme, WEBUI_NAME, mobile, socket, activeUserCount } from '$lib/stores';
|
||||
import {
|
||||
config,
|
||||
user,
|
||||
theme,
|
||||
WEBUI_NAME,
|
||||
mobile,
|
||||
socket,
|
||||
activeUserCount,
|
||||
USAGE_POOL
|
||||
} from '$lib/stores';
|
||||
import { goto } from '$app/navigation';
|
||||
import { Toaster, toast } from 'svelte-sonner';
|
||||
|
||||
@@ -76,6 +85,11 @@
|
||||
activeUserCount.set(data.count);
|
||||
});
|
||||
|
||||
_socket.on('usage', (data) => {
|
||||
console.log('usage', data);
|
||||
USAGE_POOL.set(data['models']);
|
||||
});
|
||||
|
||||
if (localStorage.token) {
|
||||
// Get Session User Info
|
||||
const sessionUser = await getSessionUser(localStorage.token).catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user