local-llm-server/llm_server/routes/v1/proxy.py

13 lines
295 B
Python
Raw Normal View History

from flask import jsonify
2023-08-21 21:28:52 -06:00
from . import bp
2023-08-23 23:11:12 -06:00
from .generate_stats import generate_stats
from ..cache import cache
from ...helpers import jsonify_pretty
2023-08-21 21:28:52 -06:00
@bp.route('/stats', methods=['GET'])
2023-08-23 23:11:12 -06:00
@cache.cached(timeout=5, query_string=True)
2023-08-21 21:28:52 -06:00
def get_stats():
return jsonify_pretty(generate_stats())