oops
This commit is contained in:
parent
508089ce11
commit
fd5796ed07
|
@ -8,7 +8,6 @@ from llm_server.routes.v1.generate import concurrent_semaphore
|
|||
from . import bp
|
||||
from .. import stats
|
||||
from ..cache import cache
|
||||
from ..helpers.http import cache_control
|
||||
from ..stats import SemaphoreCheckerThread
|
||||
from ...llm.info import get_running_model
|
||||
|
||||
|
@ -16,7 +15,7 @@ from ...llm.info import get_running_model
|
|||
@bp.route('/stats', methods=['GET'])
|
||||
@cache.cached(timeout=5, query_string=True)
|
||||
def get_stats():
|
||||
model_list = get_running_model() # will return False when the fetch fails
|
||||
model_list, error = get_running_model() # will return False when the fetch fails
|
||||
if isinstance(model_list, bool):
|
||||
online = False
|
||||
else:
|
||||
|
@ -31,7 +30,7 @@ def get_stats():
|
|||
},
|
||||
'online': online,
|
||||
'mode': opts.mode,
|
||||
'model': get_running_model(),
|
||||
'model': model_list,
|
||||
'endpoints': {
|
||||
'blocking': f'https://{request.headers.get("Host")}/{opts.frontend_api_client.strip("/")}',
|
||||
},
|
||||
|
|
Reference in New Issue