initial commit
This commit is contained in:
12
test_api.py
Normal file
12
test_api.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
url = "http://localhost:8000/chat"
|
||||
payload = {"message": "Who is the top revenue tenant?"}
|
||||
try:
|
||||
response = requests.post(url, json=payload, timeout=120)
|
||||
data = response.json()
|
||||
print(f"Analysis: {data.get('analysis')}")
|
||||
print(f"Generated SQL: {data.get('generated_sql')}")
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
Reference in New Issue
Block a user