This repository has been archived on 2024-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
local-llm-server/llm_server/routes/v1/proxy.py

11 lines
296 B
Python
Raw Normal View History

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 llm_server.custom_redis import flask_cache
from ...helpers import jsonify_pretty
2023-08-21 21:28:52 -06:00
@bp.route('/stats', methods=['GET'])
2023-09-26 22:09:11 -06:00
@flask_cache.cached(timeout=5, query_string=True)
2023-08-21 21:28:52 -06:00
def get_stats():
return jsonify_pretty(generate_stats())