OpenAI GPT generator for storing mock users in Elasticsearch and show them in a React mentions style text box.
- JavaScript.
- NodeJS.
- React.
- OpenAI API.
- Elasticsearch.
- Render.
- Vercel.
You can demo directly this project by going to this website or instead configure your own deployment as explained below.
- cd
./ai-user-generator
. - Create an environment file with the following variables:
- OPENAI_API_KEY.
- CLOUD_ID.
- ELASTIC_USER.
- ELASTIC_PASS.
- HOST.
- PORT.
- Install dependencies with
npm install
. - Run NodeJS server with
npm start
.
- cd
./user-mentions-dashboard
. - Configure server URL variable in
src/App.js
. - Install dependencies with
npm install
. - Run the app in the development mode with
npm start
.
You can go to https://<hostname>:<port>/generate/users
for testing the creation of 25 users with GPT, split them into customers or employees, and then store these in a Elasticsearch index.
First, this would generate names and emails using OpenAI API.
Then store it in a Elasticsearch index.
Go to https://<hostname>:<port>/users
endpoint for obtaining the last 25 created users.
Go to https://<hostname>:<port>/users?searchTerm=
for obtaining users according to a search term, send as a query param.
In this dashboard you will find a generator button for creating 25 new users.
Here you can find two tables showing last customers and employees stored in Elasticsearch.
Finally, you will find a text box where you can mention users by name, typing '@'.
When you click on a user from the list of match coincidences, their name will appear highlighted in the text box according to their role.
This text box also allows to search by email.
- MIT license
- Copyright 2022 © Juan AlegrÃa