Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

將各個服務的金鑰設定到'linebot'這個虛擬環境的記憶體中 #8

Open
joshhu opened this issue May 21, 2024 · 0 comments

Comments

@joshhu
Copy link
Owner

joshhu commented May 21, 2024

將各個服務的金鑰等設定到conda建立的環境中

1. 在Line Developer Console中找到「Channel access token」

image

image

image

image

image

image

image

image

image

2. 如果是在MacOS中開啟一個終端機視窗,如果是Windows 10/11,開啟一個Anconda prompt。以下步驟MacOS和Windows 10/11的指令一樣

MacOS

image

Windows 10/11

image

3. 輸入下列指令切換到本課程建立的linebot環境,要確定前面的括號要變成(linebot)

conda activate linebot

image

image

4. 輸入下列指令將剛才複製的Channel access token設定到這個conda環境中的變數。設定完終端機視窗先不要關閉

conda env config vars set LINE_ACCESS_TOKEN="你剛才在步驟1複製的channel access token"

image

5. 找到Channel secret並複製其值

image

image

image

image

image

6. 回到剛才的終端機視窗

image

7. 輸入下列指令

conda env config vars set LINE_SECRET="你剛才在步驟5複製的Channel secret"

image

8. 照以上的方法,找到ngrok的token

image

image

image

9. 回到終端機並設定

conda env config vars set NGROK_KEY="你剛才在步驟8複製的Your Authtoken"

image

10. 照上面的方法找到OpenAI的API KEY並設定

conda env config vars set OPENAI_API_KEY="你剛才在步驟8複製的Your Authtoken"

image

@joshhu joshhu changed the title 在MacOS下,將各個服務的金鑰設定到'linebot'這個虛擬環境的記憶體中 將各個服務的金鑰設定到'linebot'這個虛擬環境的記憶體中 May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant