fix initial setup (#147)
Browse files
src/reachy_mini_conversation_app/console.py
CHANGED
|
@@ -311,9 +311,6 @@ class LocalStream:
|
|
| 311 |
"""
|
| 312 |
self._stop_event.clear()
|
| 313 |
|
| 314 |
-
# Always expose settings UI if a settings app is available
|
| 315 |
-
self._init_settings_ui_if_needed()
|
| 316 |
-
|
| 317 |
# Try to load an existing instance .env first (covers subsequent runs)
|
| 318 |
if self._instance_path:
|
| 319 |
try:
|
|
@@ -354,6 +351,10 @@ class LocalStream:
|
|
| 354 |
except Exception as e:
|
| 355 |
logger.warning(f"Failed to download API key from HuggingFace: {e}")
|
| 356 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 357 |
# If key is still missing -> wait until provided via the settings UI
|
| 358 |
if not (config.OPENAI_API_KEY and str(config.OPENAI_API_KEY).strip()):
|
| 359 |
logger.warning("OPENAI_API_KEY not found. Open the app settings page to enter it.")
|
|
|
|
| 311 |
"""
|
| 312 |
self._stop_event.clear()
|
| 313 |
|
|
|
|
|
|
|
|
|
|
| 314 |
# Try to load an existing instance .env first (covers subsequent runs)
|
| 315 |
if self._instance_path:
|
| 316 |
try:
|
|
|
|
| 351 |
except Exception as e:
|
| 352 |
logger.warning(f"Failed to download API key from HuggingFace: {e}")
|
| 353 |
|
| 354 |
+
# Always expose settings UI if a settings app is available
|
| 355 |
+
# (do this AFTER loading/downloading the key so status endpoint sees the right value)
|
| 356 |
+
self._init_settings_ui_if_needed()
|
| 357 |
+
|
| 358 |
# If key is still missing -> wait until provided via the settings UI
|
| 359 |
if not (config.OPENAI_API_KEY and str(config.OPENAI_API_KEY).strip()):
|
| 360 |
logger.warning("OPENAI_API_KEY not found. Open the app settings page to enter it.")
|