Astridkraft commited on
Commit
3da3ea3
·
verified ·
1 Parent(s): ebd4701

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -2
app.py CHANGED
@@ -5,8 +5,18 @@ from pydantic import BaseModel
5
  import uvicorn
6
  from agent.core import CodeAgent
7
 
8
- # Agenten Instanziierung - Umgebung für Agent aufbauen!
9
- agent = CodeAgent(api_key=None, dummy_mode=True, project="bild")
 
 
 
 
 
 
 
 
 
 
10
 
11
  # ============================================
12
  # FASTAPI FÜR PROJEKTE
 
5
  import uvicorn
6
  from agent.core import CodeAgent
7
 
8
+
9
+ # Agent nur initialisieren, wenn aktiviert
10
+ AGENT_ACTIVE = True # Auf False setzen zum Deaktivieren
11
+
12
+ if AGENT_ACTIVE:
13
+ # Agenten Instanziierung - Umgebung für Agent aufbauen!
14
+ agent = CodeAgent(api_key=None, dummy_mode=True, project="bild")
15
+ print("✅ Agent aktiviert")
16
+ else:
17
+ agent = None # Agent deaktiviert
18
+ print("⚠️ Agent ist deaktiviert - API läuft im Dummy-Modus")
19
+
20
 
21
  # ============================================
22
  # FASTAPI FÜR PROJEKTE