Giter VIP home page Giter VIP logo

django-dalle-linebot-render's Introduction

Django-DALLE-linebot-Render

一個使用Django框架和圖像生成AI DALLE,創造一個linebot的專案,快速建置於平台Render。

1. 本專案參考了以下前輩和官方的方案改成製作,只針對剛學習Python或Django的朋友來佈置linebot在Render上。Render可取代取消免費方案的Heroku,來測試Side Project。

https://github.com/howarder3/GPT-Linebot-python-flask-on-vercel

2. 本專案因部屬在Render上,所以程式碼和Vercel版本些許不同。Render網站中,選擇新增「Web Services」,可用github帳號匯入此專案,可先fork到自己的帳號,然後設定自己的名稱和選擇免費free方案。記得按下方「Advanced」,設定環境變數。

3. 必須在Render的Environment Variables設定3個環境變數,分別是OPENAI_API_KEY和LINE_CHANNEL_SECRET和LINE_CHANNEL_ACCESS_TOKEN。然後開始部屬,可能要花上一些時間。成功後複製自己的URL貼到line developer的Webhook URL來做設定和測試。例如:

https://xxx.onrender.com/

4. 和Vercel版本的差別,注意Start Command要改為gunicorn config.wsgi:application來啟動。(一個坑,可以省你很多時間)

5. openai的依賴必須使用0.27.0以上版本。


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.