From 5e4fa09dcb58ca1cc75a1553e9413d8e54066260 Mon Sep 17 00:00:00 2001
From: Wentao Lyu <35-wentao.lyu@users.noreply.git.stereye.tech>
Date: Sat, 11 Mar 2023 16:14:24 +0800
Subject: [PATCH] update readme, add proxy and host information
---
README.md | 74 ++++++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 59 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
index d0ca06a9c..754dc0b84 100644
--- a/README.md
+++ b/README.md
@@ -55,21 +55,27 @@ Currently, this project is only functional with the `text-davinci-003` model.
# Table of Contents
- * [Roadmap](#roadmap)
- * [Features](#features)
- * [Tech Stack](#tech-stack)
- * [Getting Started](#getting-started)
- * [Prerequisites](#prerequisites)
- * [Usage](#usage)
- * [Local (npm)](#npm)
- * [Docker](#docker)
- * [Access Tokens](#access-tokens)
- * [Updating](#updating)
- * [Use Cases](#use-cases)
- * [Origin](#origin)
- * [Caveats](#caveats)
- * [Contributing](#contributing)
- * [License](#license)
+- [ChatGPT Clone](#chatgpt-clone)
+ - [All AI Conversations under One Roof.](#all-ai-conversations-under-one-roof)
+ - [Updates](#updates)
+- [Table of Contents](#table-of-contents)
+ - [Roadmap](#roadmap)
+ - [Features](#features)
+ - [Tech Stack](#tech-stack)
+ - [Getting Started](#getting-started)
+ - [Prerequisites](#prerequisites)
+ - [Usage](#usage)
+ - [Local](#local)
+ - [Docker](#docker)
+ - [Access Tokens](#access-tokens)
+ - [Proxy](#proxy)
+ - [Updating](#updating)
+ - [Use Cases](#use-cases)
+ - [Origin](#origin)
+ - [Caveats](#caveats)
+ - [Regarding use of Official ChatGPT API](#regarding-use-of-official-chatgpt-api)
+ - [Contributing](#contributing)
+ - [License](#license)
## Roadmap
@@ -143,6 +149,8 @@ Here are my recently completed and planned features:
- **Run** `npm run build` in /client/ dir, `npm start` in /api/ dir
- **Visit** http://localhost:3080 (default port) & enjoy
+By default, only local machine can access this server. To share within network or serve as a public server, set `HOST` to `0.0.0.0` in `.env` file
+
### Docker
- **Provide** all credentials, (API keys, access tokens, and Mongo Connection String) in [docker-compose.yml](docker-compose.yml) under api service
@@ -180,6 +188,42 @@ The Bing Access Token is the "_U" cookie from bing.com. Use dev tools or an exte
**Note:** Specific error handling and styling for this model is still in progress.
+### Proxy
+
+If your server cannot connect to the chatGPT API server by some reason, (eg in China). You can set a environment variable `PROXY`. This will be transmitted to `node-chatgpt-api` interface.
+
+**Warning:** `PROXY` is not `reverseProxyUrl` in `node-chatgpt-api`
+
+
+Set up proxy in local environment
+
+Here is two ways to set proxy.
+- Option 1: system level environment
+`export PROXY="http://127.0.0.1:7890"`
+- Option 2: set in .env file
+`PROXY="http://127.0.0.1:7890"`
+
+**Change `http://127.0.0.1:7890` to your proxy server**
+
+
+
+Set up proxy in docker environment
+
+set in docker-compose.yml file, under services - api - environment
+
+```
+ api:
+ ...
+ environment:
+ ...
+ - "PROXY=http://127.0.0.1:7890"
+ # add this line ↑
+```
+
+**Change `http://127.0.0.1:7890` to your proxy server**
+
+
+
### Updating
- As the project is still a work-in-progress, you should pull the latest and run the steps over. Reset your browser cache/clear site data.