codeforboston / codeforboston/maple
Function Wrapper for LLM Features
- Dominant language
- TypeScript
- Stars
- 56
- Forks
- 175
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 13
Description
## Problem
Our codebase is written in Javascript/Typescript, but the LLM team does their data analysis and LLM queries in Python. We want them to continue to be able to write code in their language of choice (without compromising our language of choice), but we need to be able to call their LLM-based summary and tag generating functions in order to populate our firestore database.
To that end, we need to set up a framework to enable us to deploy Python Cloud function/s that can wrap the LLM team's summary/tag generators.
## Success Criteria
* Python-based Google Cloud Function (in the `codeforboston/maple` repo)
* Wraps the existing LLM team code for Bill Summary and Bill Tag generation
* BillSummary function has a contract like (BillId, BillText, SectionText) -> (BillSummary)
* BillTag function has a contract like (BillId, BillText) -> [BillTags]
* Functions should be internally-accessible only (e.g. only accessible from our other backend services)
## Omissions
* Actually acquiring the section text for Bill Summaries is out-of-scope for this ticket
* This ticket doesn't cover the entire backend flow for generating and storing bill summaries - just the deployment of the cloud wrapper functions for the LLM code. Future tickets will build on this to queue up summary/tag generation requests and store the results in Firestore.
## Additional Links
* Firebase Docs on Codebase Splitting for Functions: https://firebase.google.com/docs/functions/organize-functions?gen=2nd#managing_multiple_repositories
* ML code was moved into the main MAPLE repo here: https://github.com/codeforboston/maple/pull/1631
Contributor guide
Assessment
This issue has not been assessed yet.