finai / apps /api /smoke.py
Sandy-sys's picture
Deploy FinAI
db7ef8e verified
Raw History Blame Contribute Delete
555 Bytes
from fastapi.testclient import TestClient
from mbf.app import app
c = TestClient(app)
for q in [
"Top 5 funders by FY26 actual spend",
"Show me monthly burn for FY26",
"Top spend categories",
"Open POs by vendor",
"Give me an overview",
]:
r = c.post("/ask", json={"question": q}).json()
p = r["plan"]
print(f"Q={q!r}")
print(f" mode={r['mode']} comps={len(p['components'])} "
f"types={[x['type'] for x in p['components']]}")
print(f" narrative={p['narrative'][:140]}")
print()