By Tim Wheeler from CodeSnippet.io
In this project we will learn how to use the OpenAI Chat API to build a simple customer support chatbot.
This project is a lightweight client-server application written primarily in JavaScript.
- Frontend (the
client
folder)- Written in JavaScript, HTML, and CSS
- Backend (the
server
folder)- Written in Node.js/JavaScript
- Uses Express.js, a minimal backend server framework
To run this project:
- Copy the contents of
.env.example
to a new file named.env
and fill in the required values - Run
npm install
to install dependencies - Run
npm run dev
to start the development server.- This allows you to make changes to the code and see them reflected in your browser immediately without having to restart the server
- Open
localhost:3000
in your browser to view the project
OpenAI Chat API docs: https://platform.openai.com/docs/api-reference/chat
If you liked this project, subscribe to our newsletter and follow us on social media for more just like it!