Team Ai
Apppublic

Samra09/Physical_AI_Humanoid_Robotics

sourceHugging Faceupdated 10mo agoView on Hugging Face
0likes
test_api.py21 linesDownload Raw Back to root
1 2import requests3import json4 5url = "http://localhost:8000/api/v1/query"6headers = {"Content-Type": "application/json"}7data = {8    "question": "hi",9    "selected_text": None,10    "page_content": None11}12 13try:14    print(f"Sending POST to {url}...")15    response = requests.post(url, headers=headers, json=data)16    print(f"Status Code: {response.status_code}")17    print("Response JSON:")18    print(json.dumps(response.json(), indent=2))19except Exception as e:20    print(f"Request failed: {e}")21