https://github.com/marketcalls/gpt-slack-bot
https://github.com/marketcalls/gpt-slack-bot
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/marketcalls/gpt-slack-bot
- Owner: marketcalls
- License: mit
- Created: 2024-09-28T12:22:13.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-09-29T19:44:11.000Z (about 1 year ago)
- Last Synced: 2025-02-07T16:37:50.303Z (8 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GPT Slack Bot
This project is a Slack bot powered by GPT (Generative Pre-trained Transformer) technology, with additional features like web search capabilities using the Tavily API.
## Features
- Conversational AI using GPT-4o-mini model
- Web search functionality for up-to-date information
- Session management with timeout
- Slack message formatting## Setup
1. Clone this repository
2. Install the required dependencies:
```
pip install -r requirements.txt
```
3. Copy `.env.sample` to `.env` and fill in your actual API keys and tokens:
- OPENAI_API_KEY: Your OpenAI API key
- SLACK_BOT_TOKEN: Your Slack bot token
- BOT_USER_ID: Your Slack bot user ID
- TAVILY_API_KEY: Your Tavily API key for web search functionality
4. Run the bot:
```
python app.py
```## Usage
The bot can handle general conversations and perform web searches when keywords like "recent", "search", "update", "now", "latest", "news", or "current" are detected in the message.
## Files
- `app.py`: Main application file containing the Slack bot logic and API integrations
- `requirements.txt`: List of Python dependencies
- `.env`: Configuration file for API keys and tokens (not tracked in git)
- `.env.sample`: Sample configuration file
- `test.py`: Test file for the application## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.