Skip to content

Commit

Permalink
Rename VERCEL_WEBHOOK_URL environment variable to VERCEL_DEPLOY_HOOK_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
memochou1993 committed Dec 17, 2022
1 parent 041b2b6 commit 3d02259
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ APP_WEBHOOK_PATH=

VERCEL_GIT_REPO_SLUG=gpt-ai-assistant
VERCEL_ACCESS_TOKEN=
VERCEL_WEBHOOK=
VERCEL_DEPLOY_HOOK_URL=

OPENAI_API_KEY=
OPENAI_COMPLETION_INIT_LANG=
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ GPT AI Assistant 是基於 OpenAI API 與 LINE Messaging API 實作的範例應
`ai <text>` | 詢問 AI 問題
`ai --auto-reply off` | 關閉 AI 自動回覆,須設置 `VERCEL_ACCESS_TOKEN` 環境變數
`ai --auto-reply on` | 開啟 AI 自動回覆,須設置 `VERCEL_ACCESS_TOKEN` 環境變數
`deploy` | 部署應用程式,須設置 `VERCEL_WEBHOOK_URL` 環境變數
`deploy` | 部署應用程式,須設置 `VERCEL_DEPLOY_HOOK_URL` 環境變數

## 環境變數

Expand All @@ -76,7 +76,7 @@ GPT AI Assistant 是基於 OpenAI API 與 LINE Messaging API 實作的範例應
`APP_DEBUG` | `false` | 決定是否印出訊息,可設置為 `true``false`
`APP_WEBHOOK_PATH` | `/webhook` | 決定程式的 webhook URL 路徑
`VERCEL_ACCESS_TOKEN` | `null` | Vercel 的 [access token](/demo/vercel-access-token.png)
`VERCEL_WEBHOOK_URL` | `null` | Vercel 的 [webhook URL](/demo/vercel-webhook-url.png)
`VERCEL_DEPLOY_HOOK_URL` | `null` | Vercel 的 [webhook URL](/demo/vercel-deploy-hook-url.png)
`OPENAI_API_KEY` | `null` | OpenAI 的 [API key](/demo/openai-api-key.png)
`OPENAI_COMPLETION_INIT_LANG` | `zh` | 決定 AI 助理的初始語言,可設置為 `zh``en`
`OPENAI_COMPLETION_MODEL` | `text-davinci-003` | 詳見 [model](https://beta.openai.com/docs/api-reference/completions/create#completions/create-model) 參數說明
Expand Down
2 changes: 1 addition & 1 deletion config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const config = Object.freeze({
APP_WEBHOOK_PATH: env.APP_WEBHOOK_PATH || '/webhook',
VERCEL_GIT_REPO_SLUG: env.VERCEL_GIT_REPO_SLUG || null,
VERCEL_ACCESS_TOKEN: env.VERCEL_ACCESS_TOKEN || /** @deprecated since version 1.1.1 */ env.VERCEL_API_KEY || null,
VERCEL_WEBHOOK_URL: env.VERCEL_WEBHOOK_URL || null,
VERCEL_DEPLOY_HOOK_URL: env.VERCEL_DEPLOY_HOOK_URL || null,
OPENAI_API_KEY: env.OPENAI_API_KEY || null,
OPENAI_COMPLETION_INIT_LANG: env.OPENAI_COMPLETION_INIT_LANG || 'zh',
OPENAI_COMPLETION_MODEL: env.OPENAI_COMPLETION_MODEL || 'text-davinci-003',
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion services/vercel.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const updateEnvironment = ({
target,
});

const deploy = () => axios.post(config.VERCEL_WEBHOOK_URL);
const deploy = () => axios.post(config.VERCEL_DEPLOY_HOOK_URL);

export {
fetchEnvironments,
Expand Down

0 comments on commit 3d02259

Please sign in to comment.