rag_saas_system / scripts /verify_api_fixes.py
GodRad's picture
Upload 51 files
0c8aadf verified
raw
history blame contribute delete
711 Bytes
import requests
import json
BASE_URL = "http://localhost:7860/v1"
def test_metrics():
print("Checking metrics...")
try:
res = requests.get(f"{BASE_URL}/admin/")
if res.status_code == 200:
print(f"Initial Metrics: {res.json()}")
else:
print(f"Failed to get metrics: {res.status_code}")
except Exception as e:
print(f"Error: {e}")
def test_health():
print("Checking health...")
try:
res = requests.get("http://localhost:7860/health")
print(f"Health: {res.status_code}")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
test_health()
test_metrics()