하루에 한번씩 arXiv에서 원하는 field (cs.CL 등) 의 논문을 slack message로 보내주는 코드입니다. openai chatgpt 를 활용해 논문 abstract의 3줄 요약을 기본으로 함께 제공하고 있습니다.
- Install requirements
pip install -r requirements.txt
- Define
WORKSPACES
in settings.py
WORKSPACES = [
{
'workspace': '{workspace}',
'allowed_channel': '{channel_name}',
'allowed_channel_id': '{channel_id}',
'slack_token': "{app_slack_token}",
'fields': ["{arxiv_field}",]
},
]
Example
WORKSPACES = [
{
'workspace': 'ai-research-kr',
'allowed_channel': 'nlp-research',
'allowed_channel_id': 'X000XXXXX0X',
'slack_token': "xxxx-1234567890-1234567890123-X0xx0x0xxXXxxxxXx0x0x0XX",
'fields': ["cs.CL", "cs.IR"]
},
]
- Define
OPENAI_API_KEY
in settings.py
OPENAI_API_KEY = "eeve-is-llm-of-the-year"
- Make slack bot and check api permissions & event subscriptions
- https://api.slack.com/apps?new_app=1
- The bot need to subscribe 'app_mention' event and get 'app_mentions:read', 'channels:history', 'chat:write', 'groups:history', 'im:history', 'mpim:history' OAuth Scope.
-
Invite the bot to your slack channel
-
Launch and enjoy
python main.py