2023-04-25 04:26:38 -04:00
|
|
|
##########################
|
2023-03-11 15:03:18 +08:00
|
|
|
# Server configuration.
|
2023-04-25 04:26:38 -04:00
|
|
|
##########################
|
|
|
|
|
|
|
|
|
|
# The server will listen to localhost:3080 by default. You can change the target IP as you want.
|
|
|
|
|
# If you want to make this server available externally, for example to share the server with others
|
|
|
|
|
# or expose this from a Docker container, set host to 0.0.0.0 or your external IP interface.
|
|
|
|
|
# Tips: Setting host to 0.0.0.0 means listening on all interfaces. It's not a real IP.
|
|
|
|
|
# Use localhost:port rather than 0.0.0.0:port to access the server.
|
|
|
|
|
HOST=localhost
|
2023-03-06 15:56:25 -05:00
|
|
|
PORT=3080
|
|
|
|
|
NODE_ENV=development
|
2023-03-10 21:05:35 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# Change this to proxy any API request.
|
|
|
|
|
# It's useful if your machine has difficulty calling the original API server.
|
|
|
|
|
# PROXY=
|
2023-03-11 15:03:18 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# Change this to your MongoDB URI if different and I recommend appending chatgpt-clone
|
|
|
|
|
MONGO_URI=mongodb://127.0.0.1:27017/chatgpt-clone
|
2023-03-10 21:05:35 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
##########################
|
|
|
|
|
# OpenAI Endpoint:
|
|
|
|
|
##########################
|
2023-04-05 21:21:02 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# Access key from OpenAI platform.
|
|
|
|
|
# Leave it blank to disable this feature.
|
2023-03-11 15:03:18 +08:00
|
|
|
OPENAI_KEY=
|
2023-03-29 10:17:24 -04:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# Identify the available models, separated by commas *without spaces*.
|
|
|
|
|
# The first will be default.
|
|
|
|
|
# Leave it blank to use internal settings.
|
2023-04-10 00:41:34 +08:00
|
|
|
OPENAI_MODELS=gpt-3.5-turbo,gpt-3.5-turbo-0301,text-davinci-003,gpt-4
|
2023-04-05 21:21:02 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# Reverse proxy settings for OpenAI:
|
|
|
|
|
# https://github.com/waylaidwanderer/node-chatgpt-api#using-a-reverse-proxy
|
|
|
|
|
# OPENAI_REVERSE_PROXY=
|
2023-04-05 21:21:02 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
##########################
|
|
|
|
|
# BingAI Endpoint:
|
|
|
|
|
##########################
|
2023-04-05 21:21:02 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# Also used for Sydney and jailbreak
|
2023-04-05 21:21:02 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# BingAI Tokens: the "_U" cookies value from bing.com
|
|
|
|
|
# Leave it blank to disable this endpoint.
|
|
|
|
|
BINGAI_TOKEN=
|
2023-04-08 00:14:44 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# BingAI Host:
|
|
|
|
|
# Necessary for some people in different countries, e.g. China (https://cn.bing.com)
|
|
|
|
|
# Leave it blank to use default server.
|
|
|
|
|
# BINGAI_HOST=https://cn.bing.com
|
2023-04-05 21:21:02 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
##########################
|
|
|
|
|
# ChatGPT Endpoint:
|
|
|
|
|
##########################
|
2023-03-14 01:24:43 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# ChatGPT Browser Client (free but use at your own risk)
|
|
|
|
|
# Access token from https://chat.openai.com/api/auth/session
|
|
|
|
|
# Exposes your access token to `CHATGPT_REVERSE_PROXY`
|
|
|
|
|
# Leave it blank to disable this endpoint
|
2023-03-22 20:09:52 -04:00
|
|
|
CHATGPT_TOKEN=
|
2023-04-05 21:21:02 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# Identify the available models, separated by commas. The first will be default.
|
|
|
|
|
# Leave it blank to use internal settings.
|
2023-04-10 00:41:34 +08:00
|
|
|
CHATGPT_MODELS=text-davinci-002-render-sha,text-davinci-002-render-paid,gpt-4
|
2023-04-05 21:21:02 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# Reverse proxy settings for ChatGPT
|
|
|
|
|
# https://github.com/waylaidwanderer/node-chatgpt-api#using-a-reverse-proxy
|
|
|
|
|
# By default, the server will use the node-chatgpt-api recommended proxy (a third party server).
|
|
|
|
|
# CHATGPT_REVERSE_PROXY=
|
2023-04-05 21:21:02 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
##########################
|
|
|
|
|
# Search:
|
|
|
|
|
##########################
|
2023-04-05 21:21:02 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# ENABLING SEARCH MESSAGES/CONVOS
|
|
|
|
|
# Requires the installation of the free self-hosted Meilisearch or a paid Remote Plan (Remote not tested)
|
|
|
|
|
# The easiest setup for this is through docker-compose, which takes care of it for you.
|
|
|
|
|
SEARCH=TRUE
|
2023-03-22 20:09:52 -04:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# REQUIRED FOR SEARCH: MeiliSearch Host, mainly for the API server to connect to the search server.
|
|
|
|
|
# Replace '0.0.0.0' with 'meilisearch' if serving MeiliSearch with docker-compose.
|
|
|
|
|
MEILI_HOST=http://0.0.0.0:7700
|
2023-03-23 11:49:54 -04:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# REQUIRED FOR SEARCH: MeiliSearch HTTP Address, mainly for docker-compose to expose the search server.
|
|
|
|
|
# Replace '0.0.0.0' with 'meilisearch' if serving MeiliSearch with docker-compose.
|
|
|
|
|
MEILI_HTTP_ADDR=0.0.0.0:7700
|
2023-03-23 11:49:54 -04:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# REQUIRED FOR SEARCH: In production env., a secure key is needed. You can generate your own.
|
|
|
|
|
# This master key must be at least 16 bytes, composed of valid UTF-8 characters.
|
|
|
|
|
# MeiliSearch will throw an error and refuse to launch if no master key is provided,
|
|
|
|
|
# or if it is under 16 bytes. MeiliSearch will suggest a secure autogenerated master key.
|
2023-03-23 12:45:42 -04:00
|
|
|
# Using docker, it seems recognized as production so use a secure key.
|
2023-04-25 04:26:38 -04:00
|
|
|
# This is a ready made secure key for docker-compose, you can replace it with your own.
|
|
|
|
|
MEILI_MASTER_KEY=JKMW-hGc7v_D1FkJVdbRSDNFLZcUv3S75yrxXP0SmcU
|
2023-03-14 01:24:43 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
##########################
|
2023-03-21 19:44:31 -04:00
|
|
|
# User System
|
2023-04-25 04:26:38 -04:00
|
|
|
##########################
|
2023-04-05 21:21:02 +08:00
|
|
|
|
2023-04-25 04:26:38 -04:00
|
|
|
# ENABLING THE USER SYSTEM
|
|
|
|
|
# This is not a ready to use user system.
|
|
|
|
|
# Don't use it, unless you can write your own code.
|
|
|
|
|
# Do not uncomment this unless you implemented your own user system
|
|
|
|
|
# ENABLE_USER_SYSTEM=
|