From 91ba2fad1ba4030bc5dccabe07d87c72266cf97a Mon Sep 17 00:00:00 2001 From: Cyberes Date: Sat, 30 Sep 2023 20:11:14 -0600 Subject: [PATCH] add proompter stats back in --- server.py | 4 +++- templates/home.html | 20 ++++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index 8c287be..4a896af 100644 --- a/server.py +++ b/server.py @@ -143,7 +143,9 @@ def home(): openai_client_api=f'https://{base_client_api}/openai/v1' if opts.enable_openi_compatible_backend else 'disabled', expose_openai_system_prompt=opts.expose_openai_system_prompt, enable_streaming=opts.enable_streaming, - model_choices=model_choices + model_choices=model_choices, + proompters_5_min=stats['stats']['proompters']['5_min'], + proompters_24_hrs=stats['stats']['proompters']['24_hrs'], ) diff --git a/templates/home.html b/templates/home.html index 03f58c2..c366263 100644 --- a/templates/home.html +++ b/templates/home.html @@ -74,6 +74,10 @@ h3 { font-size: 16pt; } + + .no-marker { + list-style: none; + } @@ -109,7 +113,9 @@
  1. Set your API type to {{ mode_name }}
  2. Enter {{ client_api }} in the {{ api_input_textbox }} textbox.
  3. - {% if enable_streaming %}
  4. Enter {{ ws_client_api }} in the {{ streaming_input_textbox }} textbox.
  5. {% endif %} + {% if enable_streaming %} +
  6. Enter {{ ws_client_api }} in the {{ streaming_input_textbox }} textbox.
  7. + {% endif %}
  8. If you have a token, check the Mancer AI checkbox and enter your token in the Mancer API key textbox.
  9. @@ -132,6 +138,16 @@
    +
    +

    Statistics

    + Proompters: +
      +
    • 5 minutes: {{ proompters_5_min }}
    • +
    • 24 hours: {{ proompters_24_hrs }}
    • +
    +
    +
    + {% for key, value in model_choices.items() %}

    {{ key }} - {{ value.backend_count }} workers

    @@ -146,7 +162,7 @@ OpenAI-Compatible API URL: {{ value.openai_client_api }}

    Context Size: {{ value.context_size }}

    -

    Average Generation Time: {{ value.avg_generation_time | int }} seconds

    +

    Average Generation Time: {{ value.avg_generation_time | int }}


    {% endfor %}