Slack NewsBot is an intelligent chatbot designed to bring daily news updates directly to your Slack workspace. Powered by natural language processing and personalized interactions, this chatbot not only keeps your team informed but also engages in friendly conversations.
To run the Slack NewsBot, use the following command:
python hacker_news_bot.py -i api_keys.json
Contents of api_keys.json:
Make sure you have a valid api_keys.json file with the following structure:
{
"SLACK_BOT_TOKEN": "xoxb-...",
"SLACK_APP_TOKEN": "xapp-...,"
"OPENAI_API_KEY": "sk-..."
}
- Python version: 3.11.5
- Natural Language Processing: ChatGPT
- Database Content: Hacker News API
- Slack Integration: Slackbot
- AI Stack and Relational Storage: EvaDB
- Hugging Face's Llama model for text summarization
- Fetch and display Hacker News stories.
- Engage in interactive conversations with users.
- Execute SQL queries based on user requests.
- Provide data manipulation options to users.
- Easy integration with your Slack workspace.
- Clone the repository.
- Install the required dependencies.
- Set up a Slack App and obtain the necessary tokens.
- Create an API key file (api_keys.json) with your tokens.
- Run the bot using the provided command.
SELECT id, title, by, kids FROM hacker_news_data.items;
This is project is a PoC, it is not meant to be used in a slack workspace. The bot is poorly optimized and will have a slow performance on a real workspace. Also, this project uses third-party APIs and tools, including the Hacker News API, Slack API, and OpenAI's GPT model. Make sure to comply with their terms of use and policies when using this bot.
Enjoy staying updated with the latest news with Slack NewsBot!