Public Access
Ajout du module multimédia (Text-to-Image via HuggingFace et Cloudflare) et sécurisation du routeur Multi-IA
Build and Push Docker Image / build-and-push (push) Successful in 38s
Build and Push Docker Image / build-and-push (push) Successful in 38s
This commit is contained in:
1 parent
c82e12f49a
commit
519a42107f
8 files changed
+284
-82
No files matched your search
@@ -19,7 +19,7 @@ def _do_update():
|
||||
if resp_local.status_code == 200:
|
||||
log_event("INFO", "UPDATER", "Modèle local Abliterated vérifié/mis à jour.")
|
||||
|
||||
# MAJ du catalogue OpenRouter (Gratuits ET Payants)
|
||||
# MAJ DU CATALOGUE COMPLET OPENROUTER
|
||||
resp_or = requests.get("https://openrouter.ai/api/v1/models", timeout=30)
|
||||
if resp_or.status_code == 200:
|
||||
data = resp_or.json().get("data", [])
|
||||
@@ -28,23 +28,23 @@ def _do_update():
|
||||
|
||||
for m in data:
|
||||
pricing = m.get("pricing", {})
|
||||
# Gratuits purs
|
||||
|
||||
# S'il est 100% gratuit
|
||||
if pricing.get("prompt") == "0" and pricing.get("completion") == "0":
|
||||
if "nvidia/nemotron" not in m["id"].lower():
|
||||
if "nvidia/nemotron" not in m["id"].lower(): # On garde juste cette exclusion sécurité
|
||||
modeles_gratuits.append(m["id"])
|
||||
# Ciblage des payants ultra-performants (Claude & OpenAI)
|
||||
elif "claude-3.5-sonnet" in m["id"].lower() or "gpt-4o" in m["id"].lower():
|
||||
else:
|
||||
# On intègre TOUS les modèles payants (Texte, Vision, 3D, etc.)
|
||||
modeles_payants.append(m["id"])
|
||||
|
||||
with open(CATALOGUE_FILE, "w", encoding="utf-8") as f:
|
||||
json.dump({"free_models": modeles_gratuits, "paid_models": modeles_payants}, f)
|
||||
log_event("INFO", "UPDATER", f"Catalogue dynamique mis à jour ({len(modeles_gratuits)} gratuits, {len(modeles_payants)} payants).")
|
||||
log_event("INFO", "UPDATER", f"Catalogue Global mis à jour : {len(modeles_gratuits)} gratuits, {len(modeles_payants)} payants détectés.")
|
||||
|
||||
except Exception as e:
|
||||
log_event("ERROR", "UPDATER", f"Erreur lors de la MAJ auto : {e}")
|
||||
|
||||
def trigger_update_now():
|
||||
"""Déclenchement forcé du scan en cas d'erreur de modèle."""
|
||||
threading.Thread(target=_do_update, daemon=True).start()
|
||||
|
||||
def update_models_background():
|
||||
|
||||
Reference in new issue
Block a user