consolidate: shared auth helpers
Browse files- shared/auth.py +15 -0
shared/auth.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Agent Q3 — Shared Auth Helpers"""
|
| 2 |
+
import os
|
| 3 |
+
|
| 4 |
+
def hf_headers() -> dict:
|
| 5 |
+
return {"Authorization": f"Bearer {os.getenv('HF_TOKEN','')}"}
|
| 6 |
+
|
| 7 |
+
def openrouter_headers() -> dict:
|
| 8 |
+
return {
|
| 9 |
+
"Authorization": f"Bearer {os.getenv('OPENROUTER_API_KEY','')}",
|
| 10 |
+
"HTTP-Referer": "https://madgambit.io",
|
| 11 |
+
"X-Title": "Agent Q3"
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
def runpod_headers() -> dict:
|
| 15 |
+
return {"Authorization": f"Bearer {os.getenv('RUNPOD_API_KEY','')}"}
|