React ChatGPT App
This is a simple React application that utilizes the ChatGPT model from OpenAI to create a chat interface where users can converse with ChatGPT.
Features
Chat Interface: Users can send messages and receive responses from ChatGPT. Real-time Typing Indicator: A typing indicator is displayed when ChatGPT is processing a response. Message History: Previous messages are displayed in the chat window for reference.
Prerequisites
Node.js installed on your machine OpenAI API key (required for accessing the ChatGPT model)
Installation
Clone the repository to your local machine:
git clone https://github.com/AmruthGowda91200/chatgpt-chatbot-react-api.git
Navigate to the project directory:
cd react-chatgpt-app
Install dependencies:
npm install
Obtain an API key from OpenAI and replace chatGPT_API in App.js with your API key.
Usage
Start the development server:
npm start
Open your browser and navigate to http://localhost:5173to view the application.
Type messages in the input field and press Enter to send them to ChatGPT.
ChatGPT will process your message and respond accordingly.
Customization
You can customize the chat interface, styling, and message processing logic according to your requirements. Feel free to modify the App.js file and associated components to add additional features or enhance the existing ones.
Credits
This application utilizes the following technologies and libraries:
Vite
React
Chat UI Kit React
OpenAI API
License
This project is licensed under the MIT License - see the LICENSE file for details.