import httpx import asyncio import json async def test_guvi(): url = "http://localhost:8000/api/guvi/analyze" headers = { "x-api-key": "GUVI_HACKATHON_V2", "Content-Type": "application/json" } payload = { "sessionId": "test-session-123", "message": { "sender": "scammer", "text": "Your bank account will be blocked today. Verify immediately. Send 5000 to upi id scammer@upi", "timestamp": "2026-01-21T10:15:30Z" }, "conversationHistory": [], "metadata": { "channel": "SMS", "language": "English", "locale": "IN" } } print("Sending request to GUVI endpoint...") async with httpx.AsyncClient() as client: try: response = await client.post(url, json=payload, headers=headers, timeout=30.0) print(f"Status Code: {response.status_code}") print("Response Body:") print(json.dumps(response.json(), indent=2)) except Exception as e: print(f"Error: {e}") if __name__ == "__main__": asyncio.run(test_guvi())