How to Use the OpenAI Chat API (Chat GPT)
Tim Wheeler from CodeSnippet.io
ByIn this project we will learn how to use the OpenAI Chat API to build a simple customer support chatbot.
💡 General Info
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
⚡️ Getting Started
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
📄 API Docs
OpenAI Chat API docs: https://platform.openai.com/docs/api-reference/chat
👇 Subscribe & Follow
If you liked this project, subscribe to our newsletter and follow us on social media for more just like it!