mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Tabby: Fix model name return on error
Tabby's model API is always /v1/model/list, so return "None" if the request fails since that means a model is most likely not loaded. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@ -596,6 +596,10 @@ app.post("/api/textgenerationwebui/status", jsonParser, async function (request,
|
||||
|
||||
const modelName = modelInfo?.id;
|
||||
result = modelName || result;
|
||||
} else {
|
||||
// TabbyAPI returns an error 400 if a model isn't loaded
|
||||
|
||||
result = "None"
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`Failed to get TabbyAPI model info: ${error}`);
|
||||
|
Reference in New Issue
Block a user