TogetherCrew / airflow-dags

1 stars 1 forks source link

[Hivemind] Create GithubSummaryGenerator class #95

Open cyri113 opened 7 months ago

cyri113 commented 7 months ago

Part of the Github Vectorize (Summary). Please read this document before starting.

The following changes should be implemented in dags/hivemind_etl_helpers/src/db/github/generator.

### Tasks
- [ ] Create a class `GithubSummaryGenerator`
- [ ] Inherit from [SummaryBase](https://github.com/TogetherCrew/airflow-dags/blob/main/dags/hivemind_etl_helpers/src/utils/summary/summary_base.py). See [example](https://github.com/TogetherCrew/airflow-dags/blob/main/dags/hivemind_etl_helpers/src/db/discord/summary/prepare_summaries.py#L14).
- [ ] Create a public method `generate_summary`. Given an array of llama-index documents, using the `_get_summary` class and the [query](https://github.com/fe006094d382427eb1daf746a9055849?pvs=25#5a3c53c437dc4176963ef4cee0dacc58), return a string summary.
- [ ] Create the required test cases

Note: file coverage should be 100%.