Spaces:
Running
Running
Support both ANTHROPIC_API_KEY and anthropic_key secret names
Browse files
app.py
CHANGED
|
@@ -19,7 +19,12 @@ from typing import List, Optional
|
|
| 19 |
app = FastAPI(title="Tend & Send ARI Prototype")
|
| 20 |
|
| 21 |
# Get API key from environment (set as HF Space secret)
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
|
| 25 |
# ============================================================================
|
|
|
|
| 19 |
app = FastAPI(title="Tend & Send ARI Prototype")
|
| 20 |
|
| 21 |
# Get API key from environment (set as HF Space secret)
|
| 22 |
+
# Check multiple possible secret names for flexibility
|
| 23 |
+
ANTHROPIC_API_KEY = (
|
| 24 |
+
os.environ.get("ANTHROPIC_API_KEY") or
|
| 25 |
+
os.environ.get("anthropic_key") or
|
| 26 |
+
""
|
| 27 |
+
)
|
| 28 |
|
| 29 |
|
| 30 |
# ============================================================================
|