The COVID-19 pandemic has led to the sudden rise of online learning, where teaching and learning are done remotely, mostly via platforms such as Zoom, Google Meet, or Cisco Webex. At the same time, it is getting more and more difficult to hire English teachers. This got us thinking, will it be possible to use artificial intelligence to replace some basic roles provided by real-life English teachers?
This project explores whether AI could be used for English education for children. Specifically, we explore whether AI can have a basic face-to-face conversation with the students, give lessons, and assess students' participation and pronunciation. To make this possible, it uses three main technologies:
-
It provides a digital avatar. It comes with documentation, SDK, and example applications to make it easy for anyone to integrate any third-party conversation platform.
-
It is a pre-trained language model, trained on the corpus of text with more than 175 billion parameters. It can generate anything that has a language structure.
-
Created by the Electronics and Telecommunications Research Institute in South Korea, it provides pronunciation assessment through their REST endpoint.
The application is currently programmed to follow a GrapeSEED English lesson plan (Unit 10 Lesson 1). It combines the following:
- Prerecorded lesson videos
- Asks questions about the lesson content
- Pronunciation assessment
- Basic open-ended conversation
The project is built on top of this example repository. It consists of three microservices:
-
Token
The purpose of this application is to return a single-use token as generated by the UneeQ API server, using a private token that is secret to this application. By generating tokens in this way, customer secrets can be kept securely within this application and not exposed via an HTML front-end application. - Node JS
-
Web Front End
-
Conversation Platform API
This application implements conversation platform integration with a UneeQ digital human. The application can be configured to connect a UneeQ digital human to Dialogflow, Dialogflow CX, Watson, Lex, Wolfram Alpha, and Directline concurrently. For the purposes of this project, it is configured to connect to OpenAI API. - Node JS
Most of the development is done in the Web Front End and Conversation Platform API, specifically in the directory grapeseed-ai/conversation/node/services/nlp/openai/
-
UneeQ User Account
You can start with the free trial here.
-
OpenAI API Key
You have to join the private beta here.
-
ETRI API Key
You can request the key here.
Clone the repository to your desired directory:
git clone https://github.com/Mattegray/grapeseed-ai.git
Now, you need to provide the necessary environment variables.
Create a new .env
file in the directory /grapeseed-ai/token/node
and add the following:
UNEEQ_URI=https://uneeq-server-here
UNEEQ_SECRET=uneeq-secret-here
UNEEQ_WORKSPACE=uneeq-workspace-here
UNEEQ_URI
and UNEEQ_SECRET
can be found here:
UNEEQ_WORKSPACE
is generated after you create a persona:
Go to /grapeseed-ai/web/node/main.js
and assign the same values to the following variables:
UNEEQ_URL=https://uneeq-server-here
UNEEQ_WORKSPACE=uneeq-workspace-here
Now create a new .env
file in the directory /grapeseed-ai/conversation/node
and add the following:
# OpenAI configuration
API_ROUTE_NLP_OPENAI=/openai
OPENAI_ENABLED=true
OPENAI_API_KEY=openai-api-key-here
API_ROUTE_NLP_STEM=/nlp
API_ROUTE=/api/v1
LOG_LEVEL=info
OPENAI_API_KEY
can be found here:
Go to /grapeseed-ai/token/node
and run npm install
Go to /grapeseed-ai/web/node
and run npm install
Go to /grapeseed-ai/conversation/node
and run npm install
I recommend using NGROK to run the application locally.
In the directory where NGROK is installed, run ./ngrok http 5000
Copy the generated public address. In the image above it is https://aa0e-116-37-166-206.ngrok.io
In the UneeQ persona settings, provide the public address + /api/v1/nlp/openai
as a parameter to "Bring your own Conversation" option:
Go to /grapeseed-ai/token/node
and run npm start
Go to /grapeseed-ai/web/node
and run npm start
Go to /grapeseed-ai/conversation/node
and run npm start
The application is ready at localhost:8080.
For copyright reasons, the /grapeseed-ai/web/node/assets
directory is not included. If you would like to get the files, please contact me at hyungwoo_128@outlook.com.