Add debug env endpoint
Browse files
app.py
CHANGED
|
@@ -61,6 +61,14 @@ app.add_middleware(
|
|
| 61 |
allow_methods=["*"],
|
| 62 |
allow_headers=["*"],
|
| 63 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
|
| 66 |
if os.name == "nt":
|
|
|
|
| 61 |
allow_methods=["*"],
|
| 62 |
allow_headers=["*"],
|
| 63 |
)
|
| 64 |
+
import os
|
| 65 |
+
|
| 66 |
+
@app.get("/debug/env")
|
| 67 |
+
def debug_env():
|
| 68 |
+
return {
|
| 69 |
+
"has_gemini_key": bool(os.getenv("GEMINI_API_KEY")),
|
| 70 |
+
"has_openai_key": bool(os.getenv("OPENAI_API_KEY")),
|
| 71 |
+
}
|
| 72 |
|
| 73 |
|
| 74 |
if os.name == "nt":
|