bump v0.82.0-dev, fix ping-llm auth, шрифт 11sp
This commit is contained in:
+1
-4
@@ -28,14 +28,11 @@ def register(app):
|
|||||||
|
|
||||||
@app.route("/api/v1/ping-llm", methods=["GET"])
|
@app.route("/api/v1/ping-llm", methods=["GET"])
|
||||||
def ping_llm():
|
def ping_llm():
|
||||||
"""Проверка LLM с адаптивным кэшем. # API key check
|
"""Проверка LLM с адаптивным кэшем (успех=60с, ошибка=7с)."""
|
||||||
cfg = load()
|
cfg = load()
|
||||||
required = cfg.get("api", {}).get("key", "")
|
required = cfg.get("api", {}).get("key", "")
|
||||||
if required and request.headers.get("X-Api-Key", "") != required:
|
if required and request.headers.get("X-Api-Key", "") != required:
|
||||||
return jsonify({"ok": False, "error": "unauthorized"}), 401
|
return jsonify({"ok": False, "error": "unauthorized"}), 401
|
||||||
- Успех → кэш 60с
|
|
||||||
- Ошибка → кэш 7с (LLM мог уже ожить)
|
|
||||||
"""
|
|
||||||
global _ping_llm_cache
|
global _ping_llm_cache
|
||||||
now = time.time()
|
now = time.time()
|
||||||
if _ping_llm_cache:
|
if _ping_llm_cache:
|
||||||
|
|||||||
@@ -13,14 +13,14 @@
|
|||||||
<img src="/static/logo.png" alt="elmAI" style="width:96px;height:96px;border-radius:20px;margin-bottom:10px;">
|
<img src="/static/logo.png" alt="elmAI" style="width:96px;height:96px;border-radius:20px;margin-bottom:10px;">
|
||||||
<h1>elmAI</h1>
|
<h1>elmAI</h1>
|
||||||
<p class="subtitle">Диагностика авто через ELM327 + ИИ</p>
|
<p class="subtitle">Диагностика авто через ELM327 + ИИ</p>
|
||||||
<p class="subtitle" style="font-size:12px;opacity:0.7;">v0.81.0-dev — 7 июня 2026</p>
|
<p class="subtitle" style="font-size:12px;opacity:0.7;">v0.82.0-dev — 7 июня 2026</p>
|
||||||
|
|
||||||
<div class="card" style="text-align:center;margin-bottom:20px;">
|
<div class="card" style="text-align:center;margin-bottom:20px;">
|
||||||
<p style="margin:0 0 10px 0;">📱 Скачай приложение на телефон:</p>
|
<p style="margin:0 0 10px 0;">📱 Скачай приложение на телефон:</p>
|
||||||
<a href="/static/app-debug.apk" style="color:#ff6b35;font-size:18px;font-weight:bold;text-decoration:none;">
|
<a href="/static/app-debug.apk" style="color:#ff6b35;font-size:18px;font-weight:bold;text-decoration:none;">
|
||||||
⬇️ Скачать elmAI APK
|
⬇️ Скачать elmAI APK
|
||||||
</a>
|
</a>
|
||||||
<p style="font-size:11px;opacity:0.6;margin:4px 0 0 0;">v0.81.0-dev • нажмите чтобы скачать</p>
|
<p style="font-size:11px;opacity:0.6;margin:4px 0 0 0;">v0.82.0-dev • нажмите чтобы скачать</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Кнопка десктоп-диагностики скрыта — только для разработчика с прямым ELM327 -->
|
<!-- Кнопка десктоп-диагностики скрыта — только для разработчика с прямым ELM327 -->
|
||||||
|
|||||||
Reference in New Issue
Block a user