Skip to content
Open
2 changes: 1 addition & 1 deletion .github/workflows/summarise_upcoming_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Run summary script
run: |
cd tools/llm_meetup_summary
python summarise_events_with_llms.py
python summarise_events_with_llms.py --channel events
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
6 changes: 5 additions & 1 deletion tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

5) `automation_prepare_adhoc_availability.py`: updates mentors data with specified availability hours in `samples/adhoc-prep.xlsx` in preparation for monthly ad-hoc mentorship.

6) `llm_meetup_summary\summarise_events_with_llms` sends a Slack summary of our upcoming Meetup events. Note - currently set up to use Silke's API key on the GitHub repo. Please don't abuse this :) This can be run with the GitHub Actions workflow `summarise_upcoming_events.yml` OR run manually from the llm_meetup_summary directory. To run locally, you need to create a .env file with OPENAI_API_KEY, SLACK_BOT_TEST_WEBHOOK, and SLACK_BOT_WEBHOOK keys. See .example.env for reference. The secret values can be found in https://github.com/Women-Coding-Community/WomenCodingCommunity.github.io/settings/secrets/actions.
6) `llm_meetup_summary\summarise_events_with_llms` sends a Slack summary of our upcoming Meetup events.
**Note** Currently set up to use Silke's API key on the GitHub repo. Please don't abuse this :) and reach out to her in case you would like to use.

This can be run with the GitHub Actions workflow `summarise_upcoming_events.yml` OR run manually from the llm_meetup_summary directory. To run locally, you need to create a .env file with `OPENAI_API_KEY`, `SLACK_BOT_TEST_WEBHOOK`, and SLACK_BOT_WEBHOOK keys. See .example.env for reference. The secret are stored in the repository secrets.


Then run the following commands from the terminal:
1. `python -m venv venv` (first time only)
Expand Down
11 changes: 6 additions & 5 deletions tools/llm_meetup_summary/summarise_events_with_llms.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,16 @@ def _post_to_slack(message, slack_webhook_url=SLACK_TEST_WEBHOOK):
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Summarise upcoming Meetup events and post to Slack.")
parser.add_argument(
"--test",
action="store_true",
help="Post the summary to the test Slack channel #test-meetup-summaries. Otherwise, post to #events."
"--channel",
choices=["test-meetup-summaries", "events"],
default="test-meetup-summaries",
help="Slack channel to post the summary to: 'test-meetup-summaries' or 'events'."
)
parser.add_argument("--events_file", help="Path to the events YAML file.", default=EVENTS_FILE)
args = parser.parse_args()

test_mode_activated = args.test

test_mode_activated = args.channel == "test-meetup-summaries"

if test_mode_activated:
slack_webhook_url = SLACK_TEST_WEBHOOK
else:
Expand Down