Git Product home page Git Product logo

nthu-campus-agent-line-flask's Introduction

NTHU-LINE-Flask

The LINE server which handles users' messages from LINE client based on Python flask

Get Stated

  • Install Env

    pip3 install -r requirements.txt
  • Run it in the developing mode

    python3 run.py
  • Run it in the production mode

    gunicorn app:app -c ./gunicorn.conf.py
  • Kubenetes Env

          - name: LINE_OFFICIAL_TOKEN 
            valueFrom: 
              secretKeyRef:
                name: line-official-token # kubernetes secret
                key: password
          - name: LINE_WEBHOOK_STRING 
            valueFrom: 
              secretKeyRef:
                name: line-webhook-string # kubernetes secret
                key: password
          - name: GINIP
            valueFrom:
              configMapKeyRef:
                name: gin-config
                key: ginip

Feactures

All linebot's event handler is implemented in app/linebot. There are four programs to handle the different events.

  1. callback.py:Handle all post requests come from /callback.
  2. followEvent.py:Handle the event that new user add NTHU LINE Chatbot.
  3. messageEvent.py:The chatbot core program. Process the message sends by user and will reply proper message to the user.
  4. postbackEvent.py:Handle the postback event.

Flag status

Flag status Description
init 無互動狀態
andx_insert 處理新增笑話
affair 處理校務詢問
feedback 處理問題回饋
epidemic_feedback 處理疫情意見回饋
mapping 處理地圖查詢

Docker & Kubernetes

Please refer to Dockerfile and gke folder

License

Developed by Jenson Su & Jonathan Wu

nthu-campus-agent-line-flask's People

Contributors

l7wei avatar lawrence910426 avatar music1353 avatar siriuskoan avatar

Watchers

 avatar

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.