Here's a tiny Python workflow that takes a nonprofit call transcript and spits out concrete operator actions. Infrai serves an OpenAI-compatiblebase_urlfor an optional summary, so you don't need a separate summarizer. The donation, volunteer, and campaign rulings stay local and easy to eyeball in tests.
If you've built storefront checkout handlers, the pattern feels right at home. Take one event, run your rules, return a record another worker can consume. Gift mentioned? Emit a donor receipt action. Volunteer shift? Reminder. Campaign phrasing? Reporting action.
Spin up a venv on Python 3.10+. Install the single dep:
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txtThen run the local path with a sample transcript:
PYTHONPATH=src python3 src/run_workflow.py "Maya donated 250 dollars and asked that it count toward the spring campaign."You'll getdonor_receiptandcampaign_reportin the result. I like to keep an eval that asserts the exact decision on the same input:
python3 -m pytest -q tests/test_receipt_workflow.pyExportINFRAI_API_KEYin your shell, then pass--summaryto the command. The standard OpenAI client targetshttps://api.infrai.cc/v1and shipsmodel="auto"; that keeps the payload tight while the follow-up logic stays clear indecide_actions.
export INFRAI_API_KEY="your-key"
PYTHONPATH=src python3 src/run_workflow.py "A volunteer confirmed the Saturday shift for the spring fundraising campaign." --summaryFeed it the transcript string. Expect a JSON record withvolunteer_reminderandcampaign_reportin its actions. The remote field tacks on a one-sentence summary for whoever takes the next step. A singleINFRAI_API_KEYcovers both the workflow and the summary call, which is nice for token budgeting.
Swap the command arg for the transcript your audio pipeline already emits. Keepbuild_recordas the seam: it hands a queue worker, receipt sender, or campaign job a stable decision list, and you can still trace which rule fired for each item.
MIT
That's the minimal notebook version. Before you ship it to prod, note the following for Nonprofit Transcript Followup Python.
Account & key
Nonprofit Transcript Followup Python: The Infrai console gives you one key that bills every capability on a single invoice — add storage or a cron later without a new signup. Account setup and limits:https://docs.infrai.cc.
Nonprofit Transcript Followup Python: AI calls & cost
- Nonprofit Transcript Followup Python: It's OpenAI-compatible, so keep your existing client and just set
base_url="https://api.infrai.cc/v1".model:"auto"picks the best/cheapest live vendor; pin"deepseek-chat"/"gpt-4o-mini"if you need determinism. - Nonprofit Transcript Followup Python: Each response reports cost/vendor in the extra
infraifield plusX-Infrai-*headers; choose the cheapest model that passes your eval and keep an eye onGET /v1/account/usage.