# 步驟一:創建Line官方帳號 1. 進入LineBot官方帳號:https://reurl.cc/dQab8D 2. 登入Line帳號 3. 創建Providers  4. 點擊Messaging API channel   5. 建立LINE官方帳號 6. 根據指示依序操作 7. 主頁-點選名字 8. 設定-回應設定-關閉自動回應訊息 # 步驟二:取得Messaging API 1. 設定-Messaging API-啟用Messaging API 2. 選擇服務提供者-隱私權政策及服務條款-啟用Messaging API  # 步驟三:創建LineBot機器人 1. 回到LINE Developers 2. 點選剛剛創建的Channel 3. Messaging API-最下面的Channel access token # 步驟三:迴聲機器人(Python) 1. 複製範例程式(https://github.com/line/line-bot-sdk-python) 2. 設定 tocken、secret Messaging API - Channel access token Basic settings - Channel secret 3. 將範例程式碼的Tocken、Secret改成自己的  4. 在vs code terminal輸入`pip install flask` 5. 執行程式,取得port  6. 創建ngrok帳號,取得Authtoken 7. 打開 `ngrok.exe` 輸入指令設定 ngrok Authtoken `ngrok config add-authtoken '你的ngrok Authtoken'` 輸入`ngrok http '你的 LineBot 運行的port'` (均不用引號) 9. http網址 10. 回到LINE Developers-Messaging API-Webhook URL 輸入http網址+/callback 11. 打開Use webhook 12.完成!!! # 串接Gemini 1. 前往:https://leda-office.seadeep.ai/?launchApp=SYNO.SDS.Drive.Application#file_id=823550273048852727 2. 下載 `linebot_gimini.py`、`gemini.py` 3. 把`linebot_gimini.py`的tocken、secret改成自己的 4. 前往 [Google AI Studio](https://aistudio.google.com/apikey?hl=zh-tw)  5. 複製 API key,把 `gemini.py`的API改成自己的 6. `gemini.py`的url要改成以下這段 注意:後面的`key=GEMINI_API_KEY`要改成`key={API_KEY}` 7. 執行 `linebot_gimini.py` 8. 重複步驟三的7~10就完成了 !
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up