senti-beta / scratch /debug_reason.py
joseph njoroge kariuki
Deploy Senti AI to Hugging Face Spaces
021e065
import httpx
import asyncio
import traceback
async def main():
async with httpx.AsyncClient(timeout=300.0) as client:
try:
print("Sending request to http://localhost:9206/api/v1/tax/reason...")
r = await client.post(
"http://localhost:9206/api/v1/tax/reason",
json={
"text": "Analyze the compliance implications of the new Finance Bill on digital services tax.",
"tier": "D"
}
)
print(f"Status Code: {r.status_code}")
print(f"Response: {r.text}")
except Exception as e:
print("Exception raised:")
traceback.print_exc()
if __name__ == "__main__":
asyncio.run(main())