This project is a chat bot leveraging OpenAI's GPT-4.0 model, implemented using React and TypeScript for the front end, Express for the backend, and MongoDB for data storage and OpenAI API . The application provides users with an interactive interface to engage in natural language conversations with the GPT-4.0 model.
-
Conversational Interface: Users can have dynamic and natural language conversations by inputting prompts or queries.
-
Backend Integration: The Express backend manages communication with the OpenAI API, handling requests and responses seamlessly.
-
Data Persistence: MongoDB is employed for storing user data, including prompts and model responses.
Before running the application, ensure you have the following installed:
- Node.js
- npm (Node Package Manager)
- MongoDB
-
Clone the repository:
git clone https://github.com/ShreyGrg03/ChatMate
-
Navigate to the project directory:
cd Chat Mate Ai
-
Install dependencies for both the client and server:
# Install frontend dependencies cd frontend npm install # Install backend dependencies cd backend npm install
-
Configure environment variables:
Create the
.env
file in thebackend
directory and add the following variables:OPENAI_API_KEYSET=your_openai_api_key MONGODB_URL=your_mongodb_uri
-
Start the application:
# Start the client (in the frontend directory) cd frontend npm run dev # Start the server (in the backed directory) cd backend npm run dev
- Make sure to replace
your_openai_api_key
andyour_mongodb_url
with your actual OpenAI API key and MongoDB connection URI in the.env
file.