{"repo":"howarder3/ChatGPT-Linebot-using-python-flask-on-vercel","free":true,"listed":false,"github":"https://github.com/howarder3/ChatGPT-Linebot-using-python-flask-on-vercel","clone":"git clone https://github.com/howarder3/ChatGPT-Linebot-using-python-flask-on-vercel.git","description":"GPT-Linebot using python flask for vercel","language":"Python","stars":241,"topics":["bot","chatgpt","flask","gpt","gpt-3","linebot","python"],"license":null,"category":"workflow-automation","readme_excerpt":"ChatGPT-Linebot using python flask on vercel 作者註：本專案因為作者我的免費 API 額度已經用完了，然後我現在使用的是 ChatGPT Plus ， 如果之後要我本人更新可能要等我哪天改用 ChatGPT API 了... 現在最新的版本感謝網友 @willismax 提供的 PR：https://github.com/howarder3/GPT-Linebot-python-flask-on-vercel/pull/17 但同樣的因為我沒有 ChatGPT API 的額度了... 所以也沒辦法測就直接 merge 了， 如果不能動再請大家幫忙發個 Issues/PR，感謝大大們🙏 last updated: 2023/10/9 - 更新說明 by @willismax，與修正的 repo (merged) - vercel.json修正，改為第2版 - 修正單純安裝Flask==2.2.2 會與 Werkzeug 衝突的問題，在 requirements.txt 添加 Werkzeug==2.3.7 (參考stack overflow) 本篇教學無經驗的新手也可學習，無須寫任何程式。 無經驗預計 15 20 分鐘都可以完成。老手最快可能 5 分鐘就搞定 這是使用 python flask 套件撰寫的 ChatGPT-Linebot 不需寫 code ，只需去網頁設定一些內容，新手 15 分鐘內也能建立自己的 ChatGPT-Linebot Why flask? 簡單好用，且支援 vercel Why vercel? 免費 ！！！免費額度就很夠一般使用，是 heroku 不再免費後的好選擇 註：ChatGPT 與 gpt 是同樣任務的模型，而目前透過 API 只能使用到 GPT-3 (本程式使用的方法) 而非 ChatGPT 使用的 GPT-3.5 已經改為 GPT-4，與最新的 ChatGPT 相同，只是改為使用 OpenAI API 的方式實現 安裝步驟 主要會有四個地方要去：( 這部份不看也沒關係，以下照著做就可以了！ ) 我的 github repo：透過 python 串接 openai 的 API，並透過 linebot sdk 提供簡單的訊息回復 openai：申請 OpenAI 的 API KEY line developer：創建機器人 vercel：提供訊息回復，雖然是 serverless 但已經很符合我們的需求 step 1. 至 github fork 專案 去我這個專案的 github repo 按下面的按鈕， fork 一份檔案到自己的帳號底下，等等我們會使用到 可以的話，旁邊的 Star 也幫我按一下，是對創作者最大的鼓勵！ step 2. 申請 OpenAI 的 API KEY 可以直接去這裡，一直往下拉，找到這個按鈕，並生成一個 API KEY 請務必複製下來，這個 KEY 我們取名為 OPENAI API KEY step 3. 去 line developer 建立一個新的機器人 這邊熟悉的人動作應該超快，可以略過， 以下教學是針對完全沒經驗的新手 我們先到 line developer 的首頁註冊一下， 註冊完後，點選 Messaging API。 step 3-1. 創建新的 channel 第一次使用要創建一個新的 provider 與 channel， 一個 provider 可以有很多 channel， 「 而一個 channel 對應的就是一個 c","default_branch":null,"files":null,"tree":[],"storefront":"/r/howarder3","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/howarder3/ChatGPT-Linebot-using-python-flask-on-vercel/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}