mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-08 08:08:51 +01:00
parent
2478e17164
commit
2bc87a401e
@ -137,6 +137,7 @@ router.post('/status', jsonParser, async function (request, response) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const modelsReply = await fetch(url, args);
|
const modelsReply = await fetch(url, args);
|
||||||
|
const isPossiblyLmStudio = modelsReply.headers.get('x-powered-by') === 'Express';
|
||||||
|
|
||||||
if (!modelsReply.ok) {
|
if (!modelsReply.ok) {
|
||||||
console.log('Models endpoint is offline.');
|
console.log('Models endpoint is offline.');
|
||||||
@ -174,7 +175,7 @@ router.post('/status', jsonParser, async function (request, response) {
|
|||||||
// Set result to the first model ID
|
// Set result to the first model ID
|
||||||
result = modelIds[0] || 'Valid';
|
result = modelIds[0] || 'Valid';
|
||||||
|
|
||||||
if (apiType === TEXTGEN_TYPES.OOBA) {
|
if (apiType === TEXTGEN_TYPES.OOBA && !isPossiblyLmStudio) {
|
||||||
try {
|
try {
|
||||||
const modelInfoUrl = baseUrl + '/v1/internal/model/info';
|
const modelInfoUrl = baseUrl + '/v1/internal/model/info';
|
||||||
const modelInfoReply = await fetch(modelInfoUrl, args);
|
const modelInfoReply = await fetch(modelInfoUrl, args);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user