Skip to content

Commit

Permalink
docs: improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
oceanlvr committed Dec 6, 2022
1 parent d994d40 commit 3659e20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Powered by [Probot](https://github.com/probot/probot) & [chatgpt-api](https://gi
2. **`PRIVATE_KEY` is required, it should be encoded by `base64`**.(`console.log(Buffer.from(<PRIVATE_KEY>).toString('base64'))`).
3. `SESSION_TOKEN` is required, it is generated by `ChatGPT` [website](https://chat.openai.com/chat). You can get it following [this step](https://github.com/transitive-bullshit/chatgpt-api#how-it-works).
3. Vercel Deploy (**recommend**), click [![Deploy to Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/oceanlvr/ChatGPTBot) 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. Edit the webhooks URL to your vercel app in your [vercel project setting page](https://github.com/settings/apps).
4. Edit the webhooks URL to `${vercelAPPURL}/api/github/webhooks`. For me it's https://chatgptbot.vercel.app/api/github/webhooks
5. Type `/chatgpt` in an issue, chat with the bot

*step4: update webhook URL to your vercel app domain.*
Expand Down
4 changes: 1 addition & 3 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const { ChatGPTAPI } = require('@oceanlvr/chatgpt')

let client = new ChatGPTAPI({ sessionToken: process.env.SESSION_TOKEN })
module.exports = async function search(searchPrompt) {
// await client.ensureAuth()
await client.ensureAuth()
return await client.sendMessage(searchPrompt)
}


0 comments on commit 3659e20

Please sign in to comment.