Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brianpursley/demo-bot
AI Bot Demo
https://github.com/brianpursley/demo-bot
Last synced: about 1 month ago
JSON representation
AI Bot Demo
- Host: GitHub
- URL: https://github.com/brianpursley/demo-bot
- Owner: brianpursley
- License: mit
- Created: 2024-04-27T14:59:07.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-06-22T16:46:39.000Z (6 months ago)
- Last Synced: 2024-06-23T00:15:38.929Z (6 months ago)
- Language: Python
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# demo-bot
This project is a slack bot that uses the OpenAI API.It demonstrates defining multiple custom tools that call out to APIs to retrieve product information and send emails.
## Setup
```
make install
```### Environment Variables
Configure the following environment variables, either by setting them in the `.env` file or by setting them in the environment.| Variable | Description |
|----------------------|---------------------------------------------|
| BOT_NAME | The name of the bot |
| CATALOG_DATABASE_URL | The Postgres URL to the catalog database |
| CATALOG_API_URL | The URL to the catalog API |
| CATALOG_API_TOKEN | The token for the catalog API |
| EMAIL_API_URL | The URL to the email API |
| EMAIL_API_TOKEN | The token for the email API |
| OPENAI_API_KEY | The OpenAI API key |
| OPENAI_ASSISTANT_ID | The OpenAI assistant ID |
| SLACK_APP_TOKEN | The Slack app token |
| SLACK_BOT_TOKEN | The Slack bot token |
| SMTP_SERVER | The SMTP server |
| SMTP_PORT | The SMTP port |
| SMTP_USERNAME | The SMTP username |
| SMTP_PASSWORD | The SMTP password |
| SMTP_FROM_EMAIL | The address that emails should be sent from |### Creating/Updating the OpenAI Assistant
```bash
make update-assistant
```## Running the Bot
Use `make run-demo-bot` to run the bot. You will also need to run the catalog and email APIs separately using `make run-catalog-api` and `make run-email-api`.
```bash
make run-catalog-api
``````bash
make run-email-api
``````bash
make run-demo-bot
```