This repository is designed for educators or individuals interested in incorporating GPT-4 or their customized GPT assistants into teaching pedagogies. It utilizes the LINE Official Account and LINE Developers platforms to create an educational LINE Bot. By employing teachers' LINE official accounts as a medium, this platform enables students to interact with teachers' custom GPTs via their personal LINE accounts. Additionally, it allows teachers to monitor students' learning progress by reviewing their conversations with the GPTs. This README
includes step-by-step instructions, covering everything from setting up a LINE Official Account and customizing your GPTs, to deploying the LINE Bot on Google Cloud Run for student access.
NOTE:
To have you understand how to set things up better, I use videos on YouTube to guide you through some processes i.e. creating miscellaneous accounts. If you have any questions, feel free to shoot me an email.
- Basic understanding of GPT-4 or GPT-3 (
REQUIRED
so that you won't abuse them) - I will take care of the rest : ).
- Setting Up a LINE Official Account
- Setting Up an OpenAI API Account
- Setting Up a Firebase Account
- Forking this Repository
- Setting Up a Google Cloud Account
- Creating a Cloud Run Service
-
Watch this video to set up your official account first
-
Then ensure your configuration is the same as the ones below:
-
Go to Messaging API and copy your
Channel Secret
andAccess Token
for later use.
- Go to https://platform.openai.com/docs/overview and sign up for an account.
- Set up your payment method.
Before integrating GPT-4 into your pedagogy, it's crucial to understand the pricing model of the OpenAI API. This subsection explains the cost associated with API requests.
NOTE:
Chinese characters usually count as 2 tokens, so be careful if your students are mandarin-speakers.
An API key is necessary to authenticate your requests to OpenAI. This part walks you through creating an API key so you can start customizing and using GPT models in your teaching.
- How to get your API key?
- Copy your API key and save it for later use.
Learn how to tailor GPT-4's responses to suit your educational content and objectives. This includes adjusting settings for tone, complexity, and relevance to your curriculum.
-
Copy your model ID and save it for later use.
-
Go to Firebase and log in your google account.
-
Click
Create a project
and follow the instructions to create a new project. -
Enter your project name, and agree to the terms and conditions.
-
Uncheck the
Google Analytics
box and clickCreate Project
. -
Click
Cloud Firestore
andCreate Database
. -
Choose the data center closest to your location and click
Next
. -
Choose
Start in production mode
and clickCreate
. -
Click
Start collection
, name the collectionusers
, and clickNext
. -
Click
Auto-ID
andSave
.
-
Go to
Project Settings
and clickService Accounts
. -
Click
Generate new private key
and save the JSON file for later use.
Why do I need firebase?
According to the official documentation of the LINE Messaging API, there IS NOT an API available for retrieving text content. Consequently, it's necessary to have a storage solution for archiving the responses sent by students. This setup ensures that when students quote specific messages, our custom GPTs can understand the context they are referencing.
To allow Google Cloud Run to deploy your LINE Bot, you'll need to fork this repository. This section covers the steps to set up a GitHub account and fork this repository.
To deploy your LINE Bot, you'll need a Google Cloud Account. This section details the signup process and initial configuration steps to get your account ready for deployment.
... to be added