-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kerwin
committed
Jun 24, 2023
1 parent
378dac7
commit 7bd68a3
Showing
13 changed files
with
30 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -240,57 +240,19 @@ services: | |
- database | ||
environment: | ||
TZ: Asia/Shanghai | ||
# one of two | ||
OPENAI_API_KEY: xxxxxx | ||
# one of two | ||
OPENAI_ACCESS_TOKEN: xxxxxx | ||
# api interface url, optional, available when OPENAI_API_KEY is set | ||
OPENAI_API_BASE_URL: xxxx | ||
# ChatGPTAPI 或者 ChatGPTUnofficialProxyAPI | ||
OPENAI_API_MODEL: xxxx | ||
# reverse proxy, optional | ||
API_REVERSE_PROXY: xxx | ||
# timeout, in milliseconds, optional | ||
TIMEOUT_MS: 600000 | ||
# socks proxy, optional, effective with SOCKS_PROXY_PORT | ||
SOCKS_PROXY_HOST: xxxx | ||
# socks proxy port, optional, effective with SOCKS_PROXY_HOST | ||
SOCKS_PROXY_PORT: xxxx | ||
# socks proxy, optional, effective with SOCKS_PROXY_HOST and SOCKS_PROXY_PORT | ||
SOCKS_PROXY_USERNAME: xxxx | ||
# socks proxy port, optional, effective with SOCKS_PROXY_HOST and SOCKS_PROXY_PORT | ||
SOCKS_PROXY_PASSWORD: xxxx | ||
# HTTPS Proxy,optional, support http, https, socks5 | ||
HTTPS_PROXY: http://xxx:7890 | ||
# Title for site | ||
SITE_TITLE: ChatGpt Web | ||
# access salt,optional Allow login if not empty. | ||
AUTH_SECRET_KEY: xxx | ||
# mongodb's connection string | ||
MONGODB_URL: 'mongodb://chatgpt:xxxx@database:27017' | ||
# Register enabled | ||
REGISTER_ENABLED: true | ||
# After register enabled, Allowed mailbox suffixes for website registration. If empty, any suffix is allowed | ||
REGISTER_MAILS: '@qq.com,@sina.com,@163.com' | ||
# After register enabled, Salt for password encryption | ||
PASSWORD_MD5_SALT: xxx | ||
# After register enabled, super administrator | ||
ROOT_USER: [email protected] | ||
# After register enabled, The website's domain ending without / | ||
SITE_DOMAIN: http://127.0.0.1:3002 | ||
# After register enabled, The smtp settings | ||
SMTP_HOST: smtp.exmail.qq.com | ||
SMTP_PORT: 465 | ||
SMTP_TSL: true | ||
SMTP_USERNAME: [email protected] | ||
SMTP_PASSWORD: xxx | ||
# Enable sensitive word review, because the response result is streaming, so there is currently no review. | ||
AUDIT_ENABLED: false | ||
# https://ai.baidu.com/ai-doc/ANTIPORN/Vk3h6xaga | ||
AUDIT_PROVIDER: baidu | ||
AUDIT_API_KEY: xxx | ||
AUDIT_API_SECRET: xxx | ||
AUDIT_TEXT_LABEL: xxx | ||
# Allow anyone register, Must be turned on, otherwise administrators cannot register, can be turned off later. | ||
REGISTER_ENABLED: true | ||
# More configurations, register an administrator after running and set it in the administrator page. | ||
links: | ||
- database | ||
|
||
|
@@ -318,23 +280,7 @@ The `OPENAI_API_BASE_URL` is optional and only used when setting the `OPENAI_API | |
|
||
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/yytmgc) | ||
|
||
#### Railway Environment Variables | ||
|
||
| Environment Variable | Required | Description | | ||
|------------------------|-------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------| | ||
| `PORT` | Required | Default: `3002` | | ||
| `AUTH_SECRET_KEY` | Optional | access password | | ||
| `TIMEOUT_MS` | Optional | Timeout in milliseconds | | ||
| `OPENAI_API_KEY` | Optional | Required for `OpenAI API`. `apiKey` can be obtained from [here](https://platform.openai.com/overview). | | ||
| `OPENAI_ACCESS_TOKEN` | Optional | Required for `Web API`. `accessToken` can be obtained from [here](https://chat.openai.com/api/auth/session). | | ||
| `OPENAI_API_BASE_URL` | Optional, only for `OpenAI API` | API endpoint. | | ||
| `OPENAI_API_MODEL` | `ChatGPTAPI` OR `ChatGPTUnofficialProxyAPI` | API model. | | ||
| `API_REVERSE_PROXY` | Optional, only for `Web API` | Reverse proxy address for `Web API`. [Details](https://github.com/transitive-bullshit/chatgpt-api#reverse-proxy) | | ||
| `SOCKS_PROXY_HOST` | Optional, effective with `SOCKS_PROXY_PORT` | Socks proxy. | | ||
| `SOCKS_PROXY_PORT` | Optional, effective with `SOCKS_PROXY_HOST` | Socks proxy port. | | ||
| `SOCKS_PROXY_USERNAME` | Optional, effective with `SOCKS_PROXY_HOST` & `SOCKS_PROXY_PORT` | Socks proxy username. | | ||
| `SOCKS_PROXY_PASSWORD` | Optional, effective with `SOCKS_PROXY_HOST` & `SOCKS_PROXY_PORT` | Socks proxy password. | | ||
| `HTTPS_PROXY` | Optional | HTTPS Proxy. | | ||
> Refer to this issue https://github.com/Kerwin1202/chatgpt-web/issues/266 | ||
|
||
> Note: Changing environment variables in Railway will cause re-deployment. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -244,55 +244,21 @@ services: | |
- database | ||
environment: | ||
TZ: Asia/Shanghai | ||
# 二选一 | ||
OPENAI_API_KEY: sk-xxx | ||
# 二选一 | ||
OPENAI_ACCESS_TOKEN: xxx | ||
# API接口地址,可选,设置 OPENAI_API_KEY 时可用 | ||
OPENAI_API_BASE_URL: xxx | ||
# ChatGPTAPI ChatGPTUnofficialProxyAPI | ||
OPENAI_API_MODEL: ChatGPTAPI | ||
# 反向代理,可选 | ||
API_REVERSE_PROXY: xxx | ||
# 每小时最大请求次数,可选,默认无限 | ||
MAX_REQUEST_PER_HOUR: 0 | ||
# 超时,单位毫秒,可选 | ||
TIMEOUT_MS: 600000 | ||
# Socks代理,可选,和 SOCKS_PROXY_PORT 一起时生效 | ||
SOCKS_PROXY_HOST: xxx | ||
# Socks代理端口,可选,和 SOCKS_PROXY_HOST 一起时生效 | ||
SOCKS_PROXY_PORT: xxx | ||
# HTTPS 代理,可选,支持 http,https,socks5 | ||
HTTPS_PROXY: http://xxx:7890 | ||
# 访问jwt加密参数,可选 不为空则允许登录 同时需要设置 MONGODB_URL | ||
AUTH_SECRET_KEY: xxx | ||
# 网站名称 | ||
SITE_TITLE: ChatGpt Web | ||
# mongodb 的连接字符串 | ||
MONGODB_URL: 'mongodb://chatgpt:xxxx@database:27017' | ||
# 网站是否开启注册 | ||
REGISTER_ENABLED: 'true' | ||
# 开启注册之后 网站注册允许的邮箱后缀 如果空 则允许任意后缀 | ||
REGISTER_MAILS: '@qq.com,@sina.com,@163.com' | ||
# 开启注册之后 密码加密的盐 | ||
PASSWORD_MD5_SALT: xxx | ||
# 开启注册之后 超级管理邮箱 | ||
ROOT_USER: [email protected] | ||
# 开启注册之后 网站域名 不含 / 注册的时候发送验证邮箱使用 | ||
SITE_DOMAIN: http://127.0.0.1:3002 | ||
# 开启注册之后 发送验证邮箱配置 | ||
SMTP_HOST: smtp.exmail.qq.com | ||
SMTP_PORT: 465 | ||
SMTP_TSL: 'true' | ||
SMTP_USERNAME: [email protected] | ||
SMTP_PASSWORD: xxx | ||
# 是否开启敏感词审核, 因为响应结果是流式 所以暂时没审核 | ||
AUDIT_ENABLED: 'false' | ||
# https://ai.baidu.com/ai-doc/ANTIPORN/Vk3h6xaga | ||
AUDIT_PROVIDER: baidu | ||
AUDIT_API_KEY: xxx | ||
AUDIT_API_SECRET: xxx | ||
AUDIT_TEXT_LABEL: xxx | ||
# 网站是否开启注册 必须开启, 否则管理员都没法注册, 可后续关闭 | ||
REGISTER_ENABLED: true | ||
# 更多配置, 在运行后, 注册管理员, 在管理员页面中设置 | ||
links: | ||
- database | ||
|
||
|
@@ -333,24 +299,7 @@ volumes: | |
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/yytmgc) | ||
#### Railway 环境变量 | ||
| 环境变量名称 | 必填 | 备注 | | ||
| --------------------- | ---------------------- | -------------------------------------------------------------------------------------------------- | | ||
| `PORT` | 必填 | 默认 `3002` | ||
| `AUTH_SECRET_KEY` | 可选 | 访问权限密钥 | | ||
| `MAX_REQUEST_PER_HOUR` | 可选 | 每小时最大请求次数,可选,默认无限 | | ||
| `TIMEOUT_MS` | 可选 | 超时时间,单位毫秒 | | ||
| `OPENAI_API_KEY` | `OpenAI API` 二选一 | 使用 `OpenAI API` 所需的 `apiKey` [(获取 apiKey)](https://platform.openai.com/overview) | | ||
| `OPENAI_ACCESS_TOKEN` | `Web API` 二选一 | 使用 `Web API` 所需的 `accessToken` [(获取 accessToken)](https://chat.openai.com/api/auth/session) | | ||
| `OPENAI_API_BASE_URL` | 可选,`OpenAI API` 时可用 | `API`接口地址 | | ||
| `OPENAI_API_MODEL` | ChatGPTAPI OR ChatGPTUnofficialProxyAPI | `API`模型 | | ||
| `API_REVERSE_PROXY` | 可选,`Web API` 时可用 | `Web API` 反向代理地址 [详情](https://github.com/transitive-bullshit/chatgpt-api#reverse-proxy) | | ||
| `SOCKS_PROXY_HOST` | 可选,和 `SOCKS_PROXY_PORT` 一起时生效 | Socks代理 | | ||
| `SOCKS_PROXY_PORT` | 可选,和 `SOCKS_PROXY_HOST` 一起时生效 | Socks代理端口 | | ||
| `SOCKS_PROXY_USERNAME` | 可选,和 `SOCKS_PROXY_HOST` 一起时生效 | Socks代理用户名 | | ||
| `SOCKS_PROXY_PASSWORD` | 可选,和 `SOCKS_PROXY_HOST` 一起时生效 | Socks代理密码 | | ||
| `HTTPS_PROXY` | 可选 | HTTPS 代理,支持 http,https, socks5 | | ||
> 参考这个 issue 详细教程 https://github.com/Kerwin1202/chatgpt-web/issues/266 | ||
> 注意: `Railway` 修改环境变量会重新 `Deploy` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,43 +15,17 @@ services: | |
AUTH_SECRET_KEY: | ||
# 每小时最大请求次数,可选,默认无限 | ||
MAX_REQUEST_PER_HOUR: 0 | ||
# 超时,单位毫秒,可选 | ||
TIMEOUT_MS: 600000 | ||
# Socks代理,可选,和 SOCKS_PROXY_PORT 一起时生效 | ||
SOCKS_PROXY_HOST: | ||
# Socks代理端口,可选,和 SOCKS_PROXY_HOST 一起时生效 | ||
SOCKS_PROXY_PORT: | ||
# Socks代理用户名,可选,和 SOCKS_PROXY_HOST & SOCKS_PROXY_PORT 一起时生效 | ||
SOCKS_PROXY_USERNAME: | ||
# Socks代理密码,可选,和 SOCKS_PROXY_HOST & SOCKS_PROXY_PORT 一起时生效 | ||
SOCKS_PROXY_PASSWORD: | ||
# 网站名称 | ||
SITE_TITLE: ChatGpt Web | ||
# mongodb 的连接字符串 | ||
MONGODB_URL: 'mongodb://chatgpt:xxxx@database:27017' | ||
# 网站是否开启注册 | ||
REGISTER_ENABLED: false | ||
# 开启注册之后 网站注册允许的邮箱后缀 如果空 则允许任意后缀 | ||
REGISTER_MAILS: '@qq.com,@sina.com,@163.com' | ||
# 开启注册之后 密码加密的盐 | ||
PASSWORD_MD5_SALT: anysalt | ||
# 开启注册之后 超级管理邮箱 | ||
ROOT_USER: [email protected] | ||
# 开启注册之后 网站域名 不含 / 注册的时候发送验证邮箱使用 | ||
SITE_DOMAIN: http://127.0.0.1:1002 | ||
# 开启注册之后 发送验证邮箱配置 | ||
SMTP_HOST: smtp.exmail.qq.com | ||
SMTP_PORT: 465 | ||
SMTP_TSL: true | ||
SMTP_USERNAME: ${SMTP_USERNAME} | ||
SMTP_PASSWORD: ${SMTP_PASSWORD} | ||
# 是否开启敏感词审核, 因为响应结果是流式 所以暂时没审核 | ||
AUDIT_ENABLED: false | ||
# https://ai.baidu.com/ai-doc/ANTIPORN/Vk3h6xaga | ||
AUDIT_PROVIDER: baidu | ||
AUDIT_API_KEY: | ||
AUDIT_API_SECRET: | ||
AUDIT_TEXT_LABEL: | ||
# 网站是否开启注册 必须开启, 否则管理员都没法注册, 可后续关闭 | ||
REGISTER_ENABLED: true | ||
# 更多配置, 在运行后, 注册管理员, 在管理员页面中设置 | ||
links: | ||
- database | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,12 @@ | ||
# OpenAI API Key - https://platform.openai.com/overview | ||
OPENAI_API_KEY= | ||
|
||
# change this to an `accessToken` extracted from the ChatGPT site's `https://chat.openai.com/api/auth/session` response | ||
OPENAI_ACCESS_TOKEN= | ||
|
||
# OpenAI API Base URL - https://api.openai.com | ||
OPENAI_API_BASE_URL= | ||
|
||
# ChatGPTAPI 或者 ChatGPTUnofficialProxyAPI | ||
OPENAI_API_MODEL: | ||
|
||
# set `true` to disable OpenAI API debug log | ||
OPENAI_API_DISABLE_DEBUG= | ||
|
||
# Reverse Proxy - Available on accessToken | ||
# Default: https://ai.fakeopen.com/api/conversation | ||
# More: https://github.com/transitive-bullshit/chatgpt-api#reverse-proxy | ||
API_REVERSE_PROXY= | ||
|
||
# timeout | ||
TIMEOUT_MS=100000 | ||
|
||
# Rate Limit | ||
MAX_REQUEST_PER_HOUR= | ||
|
||
# Auth Rate Limit | ||
AUTH_MAX_REQUEST_PER_MINUTE=5 | ||
|
||
# Socks Proxy Host | ||
SOCKS_PROXY_HOST= | ||
|
||
# Socks Proxy Port | ||
SOCKS_PROXY_PORT= | ||
|
||
# Socks Proxy Username | ||
SOCKS_PROXY_USERNAME= | ||
|
||
# Socks Proxy Password | ||
SOCKS_PROXY_PASSWORD= | ||
|
||
# HTTPS PROXY | ||
HTTPS_PROXY= | ||
|
||
# Title for site | ||
SITE_TITLE="ChatGpt Web" | ||
|
||
|
@@ -55,31 +20,17 @@ AUTH_SECRET_KEY= | |
|
||
# ----- Only valid after setting AUTH_SECRET_KEY begin ---- | ||
|
||
# Allow anyone register | ||
REGISTER_ENABLED=false | ||
|
||
# Enable register application review | ||
REGISTER_REVIEW=false | ||
|
||
# The site domain, Only for registration account verification | ||
# without end / | ||
SITE_DOMAIN=http://127.0.0.1:1002 | ||
|
||
# Allowed Email Providers, If it is empty, any mailbox is allowed | ||
# [email protected],@sina.com,@163.com | ||
REGISTER_MAILS=@qq.com,@sina.com,@163.com | ||
|
||
# The roon user only email | ||
ROOT_USER= | ||
|
||
# Password salt | ||
PASSWORD_MD5_SALT=anysalt | ||
|
||
# User register email verify | ||
SMTP_HOST=smtp.exmail.qq.com | ||
SMTP_PORT=465 | ||
SMTP_TSL=true | ||
SMTP_USERNAME=[email protected] | ||
SMTP_PASSWORD=yourpassword | ||
# Allow anyone register, Must be turned on, otherwise administrators cannot register, can be turned off later. | ||
REGISTER_ENABLED=true | ||
|
||
# ----- Only valid after setting AUTH_SECRET_KEY end ---- | ||
|
||
|
||
# 更多配置, 在运行后, 注册管理员, 在管理员页面中设置 | ||
# More configurations, register an administrator after running and set it in the administrator page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.