Skip to content

Integrated ChatGPT in a website using MERN stack and OpenAI API

Notifications You must be signed in to change notification settings

saifiimuhammad/GPT-Web-Integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

GPT Web Integration

Introduction

This repository contains a web application that integrates GPT (Generative Pre-trained Transformer) using the MERN (MongoDB, Express.js, React.js, Node.js) stack along with the OpenAI API. The application allows users to interact with the GPT model through a web interface. This project was my internship task at CodeAlpha.

Technologies Used

  • MERN Stack: MongoDB, Express.js, React.js, Node.js
  • Vite: For client-side build tooling
  • Material UI: UI components for React.js
  • OpenAI API: Integration for utilizing the GPT model

Folder Structure

main-folder
├── client
│   ├── [All files that come with Vite project]
└── server
    ├── index.js
    ├── routes
    │   └── chatRoutes.js
    ├── package.json
    └── package-lock.json

Screenshots

chat2 chat1

How to Use

  1. Clone the Repository:

    git clone https://github.com/MuhammadSaif/GPT-Web-Integration.git
  2. Install Dependencies:

    • Open terminal in both the client and server folders.
    • Run the following command in each folder:
      npm install
  3. Start Servers:

    • Start both servers to run the application.
    • For the client, use:
      npm run dev
    • For the server, run:
      node index.js
  4. You're All Set!:

    • You can now access the web application and interact with the GPT model.

Author

License

This project is licensed under the MIT License.