curieous commited on
Commit
40554d6
·
verified ·
1 Parent(s): cecced3

Expose Epic Errands Modal config health

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -42,6 +42,12 @@ def build_server() -> Server:
42
  "app": "epic-errands-v1",
43
  "frontend": "fully-custom-ui",
44
  "version": "v1",
 
 
 
 
 
 
45
  }
46
 
47
  @app.get("/api/bootstrap")
@@ -83,6 +89,10 @@ def _strip_inline_media(pack: dict[str, Any]) -> dict[str, Any]:
83
  return cleaned
84
 
85
 
 
 
 
 
86
  def _clean_quest(
87
  quest: dict[str, Any],
88
  *,
 
42
  "app": "epic-errands-v1",
43
  "frontend": "fully-custom-ui",
44
  "version": "v1",
45
+ "live_generation": "enabled" if os.environ.get("EPIC_ENABLE_LIVE_GENERATION") == "1" else "disabled",
46
+ "modal_image_url": "set" if _env_any("EPIC_MODAL_IMAGE_URL", "APP_MODAL_BASE_URL") else "missing",
47
+ "modal_text_url": "set" if os.environ.get("EPIC_MODAL_TEXT_URL") else "missing",
48
+ "modal_voxcpm2_url": "set" if os.environ.get("EPIC_MODAL_VOXCPM2_URL") else "missing",
49
+ "modal_nemotron_speech_url": "set" if os.environ.get("EPIC_MODAL_NEMOTRON_SPEECH_URL") else "missing",
50
+ "modal_auth_token": "set" if os.environ.get("APP_MODAL_AUTH_TOKEN") else "missing",
51
  }
52
 
53
  @app.get("/api/bootstrap")
 
89
  return cleaned
90
 
91
 
92
+ def _env_any(*keys: str) -> bool:
93
+ return any(bool(os.environ.get(key, "").strip()) for key in keys)
94
+
95
+
96
  def _clean_quest(
97
  quest: dict[str, Any],
98
  *,