Skip to content

Commit 49d42c6

Browse files
authored
Merge pull request #645 from silkenodwell/summarise_upcoming_evetns_with_llm
Summarise upcoming events with llm - update output channel to events channel instead of test channel
2 parents d67f10e + d5195f1 commit 49d42c6

3 files changed

Lines changed: 12 additions & 7 deletions

File tree

.github/workflows/summarise_upcoming_events.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Run summary script
3636
run: |
3737
cd tools/llm_meetup_summary
38-
python summarise_events_with_llms.py
38+
python summarise_events_with_llms.py --channel events
3939
env:
4040
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
4141
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

tools/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010

1111
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.
1212

13-
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.
13+
6) `llm_meetup_summary\summarise_events_with_llms` sends a Slack summary of our upcoming Meetup events.
14+
**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.
15+
16+
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.
17+
1418

1519
Then run the following commands from the terminal:
1620
1. `python -m venv venv` (first time only)

tools/llm_meetup_summary/summarise_events_with_llms.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,16 @@ def _post_to_slack(message, slack_webhook_url=SLACK_TEST_WEBHOOK):
181181
if __name__ == "__main__":
182182
parser = argparse.ArgumentParser(description="Summarise upcoming Meetup events and post to Slack.")
183183
parser.add_argument(
184-
"--test",
185-
action="store_true",
186-
help="Post the summary to the test Slack channel #test-meetup-summaries. Otherwise, post to #events."
184+
"--channel",
185+
choices=["test-meetup-summaries", "events"],
186+
default="test-meetup-summaries",
187+
help="Slack channel to post the summary to: 'test-meetup-summaries' or 'events'."
187188
)
188189
parser.add_argument("--events_file", help="Path to the events YAML file.", default=EVENTS_FILE)
189190
args = parser.parse_args()
190-
191-
test_mode_activated = args.test
192191

192+
test_mode_activated = args.channel == "test-meetup-summaries"
193+
193194
if test_mode_activated:
194195
slack_webhook_url = SLACK_TEST_WEBHOOK
195196
else:

0 commit comments

Comments
 (0)