This is a React-based application that leverages the power of OpenAI's ChatGPT API to generate human-like responses in a chat interface. This README.md will guide you through the setup and usage of this app. The Express server serves as a proxy to communicate with the ChatGPT API using gpt-turbo, as openai package has trouble using the gpt-3.5-turbo model.
Before you get started, ensure you have the following installed:
To set up the project on your local machine, follow these steps:
git clone https://github.com/yourusername/chatgpt-react-express-app.gitcd chatgpt-react-express-appnpm install.env file in the root directory and add your OpenAI API key:REACT_APP_OPENAI_API_KEY=your_openai_api_key
Run the back-end server only:
npm run serverRun the front-end React development server only:
npm run clientRun both the back-end and front-end servers concurrently:
npm run devThe application will now be running on http://localhost:3000. Open your browser and navigate to this address to start using the app.
Enter or click on the Send button to submit your message.Contributions are welcome! If you'd like to improve or expand the project, please follow these steps:
We'll review your pull request and provide feedback or merge your changes as soon as possible.
This project is licensed under the MIT License. See the LICENSE file for more details.