Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/makinhs/makin-gpt
A simple sample that allows you to run chat-gpt as a Slack bot that impersonates Alfred
https://github.com/makinhs/makin-gpt
Last synced: about 2 months ago
JSON representation
A simple sample that allows you to run chat-gpt as a Slack bot that impersonates Alfred
- Host: GitHub
- URL: https://github.com/makinhs/makin-gpt
- Owner: makinhs
- Created: 2023-09-04T13:32:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-12T14:39:29.000Z (5 months ago)
- Last Synced: 2024-08-12T17:01:51.254Z (5 months ago)
- Language: TypeScript
- Size: 343 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Makin-gpt
A simple project that shows how to integrate chat-gpt and slack bot
There's no guarantees on Alfred assistant answers. It's just a simple project to show how to integrate chat-gpt and slack bot.
Use at your own risk
## Chatgpt
You need to have a paid account on [openai](https://platform.openai.com/) to use this project.
## Slack bot
You need to have a slackbot configured in your slack workspace. You can follow this [tutorial](https://blog.logrocket.com/build-a-slackbot-in-node-js-with-slacks-bolt-api/) to create a slackbot.
## env vars
The src/common/config.ts contains the env vars that you need to set in order to run the project.
Create a .env file in the root of the project and set the following env vars:
```
OPENAI_API_KEY=sk-I....
SLACK_SIGNING_SECRET=REPLACE_YOURS
SLACK_BOT_TOKEN=xoREPLACE_YOURS
APP_TOKEN=REPLACE_YOURS
PORT=3000
SLACK_BOT_CHANNEL=REPLACE_YOURS
```## Run the project
```
npm install
npm start
```You should be able to see the slackbot in your slack workspace. We use the command as "/alfred"
Example: `/alfred Who are you`
![Response sample](docs/images/hello_alfred.png)