Commit
·
ebb27a0
1
Parent(s):
e716c29
fix: Update remaining localhost references to Runpod URL and fix verification script syntax
Browse files- src/llm_router.py +2 -2
- verify_zerogpu_url.py +4 -5
src/llm_router.py
CHANGED
|
@@ -33,7 +33,7 @@ class LLMRouter:
|
|
| 33 |
# Option B: Per-User Accounts (Multi-tenant)
|
| 34 |
try:
|
| 35 |
from zero_gpu_user_manager import ZeroGPUUserManager
|
| 36 |
-
base_url = zero_gpu_config.get("base_url", os.getenv("ZERO_GPU_API_URL", "
|
| 37 |
admin_email = zero_gpu_config.get("admin_email", os.getenv("ZERO_GPU_ADMIN_EMAIL", ""))
|
| 38 |
admin_password = zero_gpu_config.get("admin_password", os.getenv("ZERO_GPU_ADMIN_PASSWORD", ""))
|
| 39 |
db_path = zero_gpu_config.get("db_path", os.getenv("DB_PATH", "sessions.db"))
|
|
@@ -58,7 +58,7 @@ class LLMRouter:
|
|
| 58 |
# Option A: Service Account (Single-tenant)
|
| 59 |
try:
|
| 60 |
from zero_gpu_client import ZeroGPUChatClient
|
| 61 |
-
base_url = zero_gpu_config.get("base_url", os.getenv("ZERO_GPU_API_URL", "
|
| 62 |
email = zero_gpu_config.get("email", os.getenv("ZERO_GPU_EMAIL", ""))
|
| 63 |
password = zero_gpu_config.get("password", os.getenv("ZERO_GPU_PASSWORD", ""))
|
| 64 |
|
|
|
|
| 33 |
# Option B: Per-User Accounts (Multi-tenant)
|
| 34 |
try:
|
| 35 |
from zero_gpu_user_manager import ZeroGPUUserManager
|
| 36 |
+
base_url = zero_gpu_config.get("base_url", os.getenv("ZERO_GPU_API_URL", "https://bm9njt1ypzvuqw-8000.proxy.runpod.net"))
|
| 37 |
admin_email = zero_gpu_config.get("admin_email", os.getenv("ZERO_GPU_ADMIN_EMAIL", ""))
|
| 38 |
admin_password = zero_gpu_config.get("admin_password", os.getenv("ZERO_GPU_ADMIN_PASSWORD", ""))
|
| 39 |
db_path = zero_gpu_config.get("db_path", os.getenv("DB_PATH", "sessions.db"))
|
|
|
|
| 58 |
# Option A: Service Account (Single-tenant)
|
| 59 |
try:
|
| 60 |
from zero_gpu_client import ZeroGPUChatClient
|
| 61 |
+
base_url = zero_gpu_config.get("base_url", os.getenv("ZERO_GPU_API_URL", "https://bm9njt1ypzvuqw-8000.proxy.runpod.net"))
|
| 62 |
email = zero_gpu_config.get("email", os.getenv("ZERO_GPU_EMAIL", ""))
|
| 63 |
password = zero_gpu_config.get("password", os.getenv("ZERO_GPU_PASSWORD", ""))
|
| 64 |
|
verify_zerogpu_url.py
CHANGED
|
@@ -226,10 +226,10 @@ def main():
|
|
| 226 |
is_valid, error = validate_url_format(url)
|
| 227 |
if not is_valid:
|
| 228 |
print(f"✗ URL validation failed: {error}")
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
sys.exit(1)
|
| 234 |
print("✓ URL format is valid")
|
| 235 |
else:
|
|
@@ -272,7 +272,6 @@ def main():
|
|
| 272 |
print(f"API Info: {'✓ Accessible' if connectivity_results['api_info'] else '⚠ Not tested/Failed'}")
|
| 273 |
|
| 274 |
if connectivity_results["reachable"]:
|
| 275 |
-
print("\n✓ ZeroGPU API URL is valid and working!")
|
| 276 |
print("\n✓ ZeroGPU API URL is valid and working!")
|
| 277 |
print("\nYou can use this URL in your environment:")
|
| 278 |
print(f" ZERO_GPU_API_URL={url}")
|
|
|
|
| 226 |
is_valid, error = validate_url_format(url)
|
| 227 |
if not is_valid:
|
| 228 |
print(f"✗ URL validation failed: {error}")
|
| 229 |
+
print("\nCorrect format examples:")
|
| 230 |
+
print(" https://bm9njt1ypzvuqw-8000.proxy.runpod.net")
|
| 231 |
+
print(" https://<pod-id>-8000.proxy.runpod.net")
|
| 232 |
+
print(" http://<ip-address>:8000 (if using direct IP)")
|
| 233 |
sys.exit(1)
|
| 234 |
print("✓ URL format is valid")
|
| 235 |
else:
|
|
|
|
| 272 |
print(f"API Info: {'✓ Accessible' if connectivity_results['api_info'] else '⚠ Not tested/Failed'}")
|
| 273 |
|
| 274 |
if connectivity_results["reachable"]:
|
|
|
|
| 275 |
print("\n✓ ZeroGPU API URL is valid and working!")
|
| 276 |
print("\nYou can use this URL in your environment:")
|
| 277 |
print(f" ZERO_GPU_API_URL={url}")
|