A random purpose bot for us.
LINE bot with Firebase backend integrated with Google/OpenAI APIs.
- Setup Firebase Functions
- If you want to setup a new bot by yourself, create a new firebase project for your own.
- If you want to contribute to the existing bots, let @yushiomote know your Google account.
- To short,
- Install
node
: e.g.brew install node
- Install
firebase-tools
: e.g.npm install -g firebase-tools
- Login to the firebase project:
firebase login
- Install
- Setup LINE bot with webhook enabled
- Configure firebase using Firebase environment configuration:
$ firebase functions:config:set line.secret=<LINE bot secret>
$ firebase functions:config:set line.token=<LINE bot token>
$ firebase functions:config:set app.name=<Any bot name>
$ firebase functions:config:set app.theme=<Emoji used in bot messages>
$ firebase functions:config:set openai.apikey=<API Key for Open AI>
- Install dependencies
$ cd functions # In functions directory
$ npm install
- Build
$ cd functions # In functions directory
$ npm run build
Test bot account exists. Let @yushiomote know when you want to try.