The ChatGPT clone uses chat completion v1 API with your gpt model and express.js to run a server requesting client-side requests.
![react-chatgpt-clone](https://private-user-images.githubusercontent.com/29861553/306970274-c3f8b227-5567-4f29-95ff-43ea82069c08.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyOTQ2MzEsIm5iZiI6MTcyNDI5NDMzMSwicGF0aCI6Ii8yOTg2MTU1My8zMDY5NzAyNzQtYzNmOGIyMjctNTU2Ny00ZjI5LTk1ZmYtNDNlYTgyMDY5YzA4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIyVDAyMzg1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYzODVkMzljNzU2YzY3MTFkNzJhMjRiMTAyMDE0ZDMxNWIzOGU4ZTdiNTU0MDZmNzdiMDIyMWZiNjIzMzNhMTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1fSKieuEiXG6VpbDckeWcAvEVtKad9iFKRavhO7ZAhM)
Copy all variables from .env.example
to new created .env
file and change the appropriate variables with your values. You can get all necessary data at Platform OpenAI.
Install dependencies.
npm i
Start backend server with nodemon.
npm run dev:back
Start frontend server with vite.
npm run dev:front