/chatgpt-clone

ChatGPT (Chat Generative Pre-trained Transformer) is a chatbot developed by OpenAI and launched in November 2022. It is built on top of OpenAI's GPT-3 family of large language models and has been fine-tuned (an approach to transfer learning) using both supervised and reinforcement learning techniques.

Primary LanguageTypeScript


ChatGPT Clone


ChatGPT Clone

ChatGPT (Chat Generative Pre-trained Transformer) is a chatbot developed by OpenAI and launched in November 2022. It is built on top of OpenAI's GPT-3 family of large language models and has been fine-tuned (an approach to transfer learning) using both supervised and reinforcement learning techniques.


Installation

**Note**: This app requires API key from OPENAI, Google OAuth Client ID and Client Secret and Firebase Service Account Key

1. Download Node.js and npm (follow instructions here)

2. Git clone and cd into the repo folder:

https://github.com/sumitKcs/chatgpt-clone.git && cd chatgpt-clone

3. Install all dependencies

npm install

4. In root directory of the project files, create a .env.local file

.env.local

5. In the .env.local file, create following environment variables:

GOOGLE_ID=YOUR_GOOGLE_OAUTH_ID
GOOGLE_SECRET=YOUR_GOOGLE_OAUTH_SECRET_KEY
NEXTAUTH_SECRET=ANY_RANDOM_LONG_ALPHANUMERIC_STRING
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
FIREBASE_SERVICE_ACCOUNT_KEY=YOUR_FIREBASE_SERVICE_ACCOUNT_KEY

3. Run the server

npm start
#for deployed version

npm run dev
#for deployed version

4. Access the project in your browser at localhost:3000


Tech Stack


Live Site

ChatGPT Clone deployed on Railway.app.