More information here: https://openbb.co/blog/how-we-used-openai-to-extract-insights-from-team-surveys
Extract insights from the team survey data into a Slack message using OpenAI.
This is what OpenBB's team survey data looks like:
$ python extract_insights_from_last_team_survey.py
This is what you can expect for output in case of the script running successfully.
Loading environment variables...
Loading team survey data from Airtable...
Processing data from Airtable...
Extracting insights from team survey data...
Sending insights to Slack through a message...
SUCCESS: Message posted to Didier Lopes
- Create new environment:
conda create --name insights
- Activate new environment:
conda activate insights
- Install python and poetry
conda install python poetry
- Let poetry install all dependencies
poetry install
Create an .env
file and copy-paste:
SLACK_WEBHOOK_URL='REPLACEME'
AIRTABLE_API_KEY = 'REPLACEME'
AIRTABLE_BASE_ID = 'REPLACEME'
AIRTABLE_TABLE_NAME = 'REPLACEME'
OPENAI_API_KEY = "REPLACEME"
with REPLACEME
being replaced by your own keys extracted from Slack, Airtable and OpenAI, respectively. Note that for Airtable you will need details from the table you are trying to access information from.