13 lines
365 B
Python
13 lines
365 B
Python
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}")
|