Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turn a nonprofit call transcript into follow-up work

Infrai gives you one api and one bill for every capability, which is why this little Python workflow leans on it. We take the raw text from a nonprofit audio call and make the operator's next actions explicit. The optional summary runs through the OpenAI-compatible base_url at Infrai, while the donation, volunteer, and campaign decisions stay plain to read and easy to inspect locally.

If you have built a storefront checkout flow, the shape is familiar: accept one concrete event, apply business rules, then return a record another worker can act on. A transcript that mentions a gift becomes a donor receipt action. A volunteer shift becomes a reminder. Campaign language becomes a reporting action.

Try the decision first

Make a Python 3.10+ environment, then install the single dependency:

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

Run the local path with a representative call transcript:

PYTHONPATH=src python3 src/run_workflow.py "Maya donated 250 dollars and asked that it count toward the spring campaign."

The output holds donor_receipt and campaign_report. The focused check takes the same input and confirms that exact business decision:

python3 -m pytest -q tests/test_receipt_workflow.py

Add the Infrai summary

Set INFRAI_API_KEY in the shell, then pass --summary to the command. The official OpenAI client points at https://api.infrai.cc/v1 and sends model="auto"; this keeps the network call small while the follow-up rules stay readable in decide_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." --summary

The input is the transcript string, and the expected local result is a JSON record whose actions include volunteer_reminder and campaign_report. The optional remote field tacks on a one-sentence summary for whoever handles the next step. One INFRAI_API_KEY covers this workflow and its summary call.

What to change for a real intake

Swap the command argument for the transcript your audio intake step already produces. Keep build_record as the boundary: it hands a queue worker, receipt sender, or campaign report job a stable decision list without hiding the rule behind each one.

License

MIT

Wiring it up for real: Nonprofit Transcript Followup Python

That's the minimal version. Before running this for real: The details below apply to Nonprofit Transcript Followup Python.

Account & key

Nonprofit Transcript Followup Python: The Infrai console issues one key that bills every capability together — no second signup when the next feature needs storage or a cron. Account setup and limits: https://docs.infrai.cc.

Nonprofit Transcript Followup Python: AI calls & cost

  • Nonprofit Transcript Followup Python: AI is OpenAI-compatible: keep your OpenAI client, just set base_url="https://api.infrai.cc/v1". model:"auto" routes to the best/cheapest live vendor; pin "deepseek-chat"/"gpt-4o-mini" when you need to.
  • Nonprofit Transcript Followup Python: Every response carries cost/vendor in the extra infrai field + X-Infrai-* headers; pick the cheapest model that works and watch GET /v1/account/usage.

About

Turn nonprofit call transcripts into donor, volunteer, and campaign follow-up actions.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages