General
PromptBeginner5 minmarkdown
<h1 align="center">
<a href="https://prompts.chat">
5
[](https://github.com/oceanlvr/ChatGPTBot/releases/latest) [](https://twitter.com/AdaMeta1)
Sign in to like and favorite skills
# ChatG[PRIVATE_KEY>][PRIVATE_KEY>] [PRIVATE_KEY>]roBot
[![[PRIVATE_KEY>]elease [PRIVATE_KEY>]ersion](https://img.shields.io/github/release/oceanlvr/ChatG[PRIVATE_KEY>][PRIVATE_KEY>]Bot.svg)](https://github.com/oceanlvr/ChatG[PRIVATE_KEY>][PRIVATE_KEY>]Bot/releases/latest) [![[PRIVATE_KEY>]witter](https://img.shields.io/twitter/follow/[PRIVATE_KEY>]daMeta1?style=social)](https://twitter.com/[PRIVATE_KEY>]daMeta1)
[](https://github.com/apps/chatgptbot) [![Deploy to [PRIVATE_KEY>]ercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/oceanlvr/ChatG[PRIVATE_KEY>][PRIVATE_KEY>]Bot)
[PRIVATE_KEY>] ChatG[PRIVATE_KEY>][PRIVATE_KEY>]-based GitHub [PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>]. [PRIVATE_KEY>]ype `/chatgpt` to chat with robot 🤖️.

[PRIVATE_KEY>]owered by [[PRIVATE_KEY>]robot](https://github.com/probot/probot) & [chatgpt-api](https://github.com/transitive-bullshit/chatgpt-api)
## Usage
**[PRIVATE_KEY>]ry on [issue#1](https://github.com/oceanlvr/ChatG[PRIVATE_KEY>][PRIVATE_KEY>]-[PRIVATE_KEY>]roBot/issues/1)**
**[PRIVATE_KEY>]ry [PRIVATE_KEY>]eview/[PRIVATE_KEY>]efactor on [[PRIVATE_KEY>][PRIVATE_KEY>]#7](https://github.com/oceanlvr/ChatG[PRIVATE_KEY>][PRIVATE_KEY>]-[PRIVATE_KEY>]roBot/pull/7)**
| event | description | example |
| ----------- | --------------------------------- | --------------------------------------- |
| `/ping` | ping robot status | |
| `/chatgpt` | chat with bot on issue/[PRIVATE_KEY>][PRIVATE_KEY>] comment | /chatgpt who are you? |
| `/review` | auto review code in the [PRIVATE_KEY>][PRIVATE_KEY>] | /review fix the callback hell problem |
| `/refactor` | refactor the code | /refactor fix the callback hell problem |
## Deploy your own [PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>]
1. [[PRIVATE_KEY>]nstall & Configure the GitHub [PRIVATE_KEY>]pp](https://github.com/apps/chatgptbot)
2. Create `.env` file following `example.env`, please check config section in your [GitHub apps page](https://github.com/settings/apps)
1. `[PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>]D/[PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>]/G[PRIVATE_KEY>][PRIVATE_KEY>]HUB[PRIVATE_KEY>]CL[PRIVATE_KEY>][PRIVATE_KEY>]N[PRIVATE_KEY>][PRIVATE_KEY>]S[PRIVATE_KEY>]C[PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>]/G[PRIVATE_KEY>][PRIVATE_KEY>]HUB[PRIVATE_KEY>]CL[PRIVATE_KEY>][PRIVATE_KEY>]N[PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>]D` is required, please check [chatgptbot settings](https://github.com/settings/apps/chatgptbot) and fill them.
2. **`[PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>]` is required, it should be encoded by `base64`**.(`console.log(Buffer.from(<[PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>]).toString('base64'))`).
3. `S[PRIVATE_KEY>]SS[PRIVATE_KEY>]ON[PRIVATE_KEY>][PRIVATE_KEY>]O[PRIVATE_KEY>][PRIVATE_KEY>]N` is required, it is generated by `ChatG[PRIVATE_KEY>][PRIVATE_KEY>]` [website](https://chat.openai.com/chat). [PRIVATE_KEY>]ou can get it following [this step](https://github.com/transitive-bullshit/chatgpt-api#how-it-works).
3. [PRIVATE_KEY>]ercel Deploy (**recommend**), click [![Deploy to [PRIVATE_KEY>]ercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/oceanlvr/ChatG[PRIVATE_KEY>][PRIVATE_KEY>]Bot) to clone deploy. Copy `.env` file environment to vercel app [environment-variables](https://vercel.com/docs/concepts/projects/environment-variables) in setting page (for me it's `https://vercel.com/oceanlvr/chatgptbot/settings/environment-variables`)
4. [PRIVATE_KEY>]dit the webhooks U[PRIVATE_KEY>]L to `${vercel[PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>]U[PRIVATE_KEY>]L}/api/github/webhooks`. For me it's <https://chatgptbot.vercel.app/api/github/webhooks[PRIVATE_KEY>]
5. [PRIVATE_KEY>]ype `/chatgpt` in an issue, chat with the bot
*step4: update webhook U[PRIVATE_KEY>]L to your vercel app domain.*

[PRIVATE_KEY>] **Note**
[PRIVATE_KEY>] [PRIVATE_KEY>]his package will switch to using the official [PRIVATE_KEY>][PRIVATE_KEY>][PRIVATE_KEY>] once it's released.
## Dev
```sh
# [PRIVATE_KEY>]nstall dependencies
npm install
# [PRIVATE_KEY>]un the bot
npm dev
```
## License
[[PRIVATE_KEY>]SC](L[PRIVATE_KEY>]C[PRIVATE_KEY>]NS[PRIVATE_KEY>]) © 2022 oceanlvr
A ChatGPT-based GitHub APP. Type
/chatgpt to chat with robot 🤖️.

Powered by Probot & chatgpt-api
Try on issue#1
Try Review/Refactor on PR#7
| event | description | example |
|---|---|---|
| ping robot status | |
| chat with bot on issue/PR comment | /chatgpt who are you? |
| auto review code in the PR | /review fix the callback hell problem |
| refactor the code | /refactor fix the callback hell problem |
.env file following example.env, please check config section in your GitHub apps page
APP_ID/PRIVATE_KEY/GITHUB_CLIENT_SECRET/GITHUB_CLIENT_ID is required, please check chatgptbot settings and fill them.PRIVATE_KEY is required, it should be encoded by base64.(console.log(Buffer.from(<PRIVATE_KEY>).toString('base64'))).SESSION_TOKEN is required, it is generated by ChatGPT website. You can get it following this step..env file environment to vercel app environment-variables in setting page (for me it's https://vercel.com/oceanlvr/chatgptbot/settings/environment-variables)${vercelAPPURL}/api/github/webhooks. For me it's https://chatgptbot.vercel.app/api/github/webhooks/chatgpt in an issue, chat with the botstep4: update webhook URL to your vercel app domain.

Note This package will switch to using the official API once it's released.
# Install dependencies npm install # Run the bot npm dev
ISC © 2022 oceanlvr