fix homepage incorrectly showing online when all backends are offline
This commit is contained in:
parent
009039dbd8
commit
885b2d64f7
|
@ -108,8 +108,11 @@ def get_model_choices(regen: bool = False):
|
|||
default_backend_url = get_a_cluster_backend()
|
||||
default_backend_info = cluster_config.get_backend(default_backend_url)
|
||||
if not default_backend_info.get('model'):
|
||||
return {}, None
|
||||
default_model = default_backend_info['model']
|
||||
# If everything is offline.
|
||||
model_choices = {}
|
||||
default_model = None
|
||||
else:
|
||||
default_model = default_backend_info['model']
|
||||
|
||||
redis.setp('model_choices', (model_choices, default_model))
|
||||
return model_choices, default_model
|
||||
|
|
|
@ -5,9 +5,6 @@
|
|||
<title>{{ llm_middleware_name }}</title>
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport"/>
|
||||
{{ analytics_tracking_code|safe }}
|
||||
<!-- https://highlightjs.org/demo#lang=json -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css" rel="stylesheet">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
|
||||
<style>
|
||||
.container {
|
||||
padding: 1em 3em;
|
||||
|
|
Reference in New Issue