mirror of
https://git.sync.wtf/troed/oc-ls-stats.git
synced 2026-08-31 09:43:38 +03:00
fix: poll llama-server even without model to detect late startup
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/package.json",
|
||||
"name": "@troed/oc-ls-stats",
|
||||
"version": "0.0.67",
|
||||
"version": "0.0.68",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./tui": {
|
||||
|
||||
@@ -297,13 +297,6 @@ const tui: TuiPlugin = async (api) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (!model) {
|
||||
tracker.failure = "no model found"
|
||||
bump()
|
||||
return
|
||||
}
|
||||
tracker.failure = null
|
||||
|
||||
let anyPrefilling = false
|
||||
let anyGenerating = false
|
||||
let genEnded = false
|
||||
@@ -314,6 +307,13 @@ const tui: TuiPlugin = async (api) => {
|
||||
for (const baseUrl of llamaServerUrls) {
|
||||
const slots = await fetchSlots(baseUrl, model)
|
||||
const slotList = Array.isArray(slots) ? slots : slots ? Object.values(slots) : []
|
||||
if (slotList.length === 0) {
|
||||
tracker.failure = "no model found"
|
||||
bump()
|
||||
continue
|
||||
}
|
||||
tracker.failure = null
|
||||
|
||||
debug(`poll baseUrl=${baseUrl} slots=${JSON.stringify(slotList)}`)
|
||||
|
||||
for (const slot of slotList) {
|
||||
|
||||
Reference in New Issue
Block a user