docs : update the documentation (#345)

* Add files via upload

* Delete documents/report_templates directory

* Update PR-TEMPLATE.md

* Update README.md

removed templates from TOC

* Update SECURITY.md

- update to follow documentation guidelines
- update discord link to point to issues

* Update SECURITY.md

* Update README.md

add security to TOC

* Delete pull_request_template.md

moved to .github

* Rename PR-TEMPLATE.md to PULL-REQUEST.md

* Update mac_install.md

clean up and update

* Update windows_install.md

fix formating and change update instructions

* Update windows_install.md

add docker recommendation

* Update windows_install.md

* Update mac_install.md
This commit is contained in:
Fuegovic 2023-05-21 08:42:16 -04:00 committed by GitHub
parent 5964b71e14
commit 8d4ef16b7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 138 additions and 162 deletions

View file

@ -2,21 +2,38 @@
Thanks to @heathriel!
##
**Install the prerequisites**:
**Recommended - [Docker Install](docker_install.md)**
## **Install the prerequisites**:
- Install Homebrew (if not already installed) by following the instructions on https://brew.sh/
- Install Node.js and npm by running `brew install node`
- Install MongoDB (if not using Docker) by running `brew tap mongodb/brew` and `brew install mongodb-community`
- Install Docker (optional) by following the instructions on https://docs.docker.com/desktop/mac/install/
- Obtain an OpenAI API key, BingAI and ChatGPT access tokens as described in the original instructions
-
**Instructions:**
- **Create a MongoDB database**
- Navigate to https://www.mongodb.com/ and Sign In or Create an account
- Create a new project
- Build a Database using the free plan and name the cluster (example: chatgpt-clone)
- Use the "Username and Password" method for authentication
- Add your current IP to the access list
- Then in the Database Deployment tab click on Connect
- In "Choose a connection method" select "Connect your application"
- Driver = Node.js / Version = 4.1 or later
- Copy the connection string and save it somewhere(you will need it later)
## **Instructions:**
- Open Terminal and clone the repository by running git clone https://github.com/danny-avila/chatgpt-clone.git
- Change into the cloned directory by running cd chatgpt-clone
- If using MongoDB Atlas, remove &w=majority from the default connection string
Follow the instructions for setting up proxies, access tokens, and user system:
**Access Tokens:**
### **Access Tokens:**
**Get your OpenAI API key**
- here: https://platform.openai.com/account/api-keys and save it somewhere safe (you will need it later)
**ChatGPT Free Instructions:**
@ -31,33 +48,13 @@ Follow the instructions for setting up proxies, access tokens, and user system:
- Expand the "Cookies" section under "Storage".
- Copy the value of the "_U" cookie and save it somewhere. You'll need it later.
**Set up proxy in the local environment (for Mac):**
**Option 1: Set system-level environment variable**
- Open Terminal and run export PROXY="http://127.0.0.1:7890"
- Change http://127.0.0.1:7890 to your proxy server
**Option 2: Set in .env file**
- Open the .env file in the api directory with a text editor
- Add PROXY="http://127.0.0.1:7890" to the file
- Change http://127.0.0.1:7890 to your proxy server
**Set up proxy in the Docker environment (for Mac):**
- Open the docker-compose.yml file with a text editor
- Under services, find the api section, and then locate the environment section
- Add the line - "PROXY=http://127.0.0.1:7890" under the environment section
- Change http://127.0.0.1:7890 to your proxy server
## **Setup Instruction**
- Create a .env file in the api directory by running cp api/.env.example api/.env and edit the file with your preferred text editor, adding the required API keys, access tokens, and MongoDB connection string
- Run npm ci root directory `npm ci`
- Run npm ci from root directory `npm ci`
- Build the client by running `npm run frontend`
**Download MeiliSearch for macOS:**
**Download MeiliSearch for macOS (optional):**
- You can download the latest MeiliSearch binary for macOS from their GitHub releases page: https://github.com/meilisearch/MeiliSearch/releases. Look for the file named meilisearch-macos-amd64 (or the equivalent for your system architecture) and download it.
**Make the binary executable:**
@ -85,10 +82,10 @@ MEILISEARCH_KEY=your_master_key_goes_here
- With MeiliSearch running and configured, the ChatGPT-Clone project should now have the Conversation search feature enabled.
- In the chatgpt-clone directory, start the application by running cd api && npm start
- In the chatgpt-clone directory, start the application by running `npm run backend`
Visit http://localhost:3080 (default port) & enjoy
**Optional but recommended:**
## **Optional but recommended:**
- Create a script to automate the starting process by creating a new file named start_chatgpt.sh in the chatgpt-clone directory and pasting the following code:
@ -111,9 +108,12 @@ npm run backend
```
./start_chatgpt.sh
```
##
**Note:**
- To share within the network or serve as a public server, set HOST to 0.0.0.0 in the .env file.
## **Update**
- run `git pull` from the root dir
- Run npm ci from root directory `npm ci`
- Build the client by running `npm run frontend`
##

View file

@ -1,22 +1,24 @@
# Windows Install
### Recommended:
### **[Docker](docker.md)**
or
### **[Automated Installer (Windows)](https://github.com/fuegovic/chatgpt-clone-local-installer)**
(Includes a Startup and Update Utility)
##
## Manual Installation
### Install the prerequisites on your machine
- **Download chatgpt-clone**
-
- Download the latest release here: https://github.com/danny-avila/chatgpt-clone/releases/
- Or by clicking on the green code button in the top of the page and selecting "Download ZIP"
- Or (Recommended if you have Git installed) pull the latest release from the main branch
- If you downloaded a zip file, extract the content in "C:/chatgpt-clone/"
- **IMPORTANT : If you install the files somewhere else modify the instructions accordingly**
- ** **Enable the Conversation search feature:**** (optional)
- **Enable the Conversation search feature:** (optional)
- Download MeiliSearch latest release from : https://github.com/meilisearch/meilisearch/releases
- Copy it to "C:/chatgpt-clone/"
@ -81,25 +83,24 @@ To use the app:
- **Make a batch file to automate the starting process**
- Open a text editor
- Paste the following code in a new document
- The meilisearch executable needs to be at the root of the chatgpt-clone directory
- Put your MeiliSearch master key instead of "your_master_key_goes_here"
- Save the file as "C:/chatgpt-clone/chatgpt-clone.bat"
- you can make a shortcut of this batch file and put it anywhere
```
REM the meilisearch executable needs to be at the root of the chatgpt-clone directory
start "MeiliSearch" cmd /k "meilisearch --master-key your_master_key_goes_here
REM ↑↑↑ meilisearch is the name of the meilisearch executable, put your own master key there
start "ChatGPT-Clone" cmd /k "npm run backend"
REM this batch file goes at the root of the chatgpt-clone directory (C:/chatgpt-clone/)
```
### Update the app version
### **Update**
- run `git pull` from the root dir
- Run npm ci from root directory `npm ci`
- Build the client by running `npm run frontend`
If you update the chatgpt-clone project files, mannually redo the `npm ci` and `npm run frontend` steps
##