|
""" |
|
以下所有配置也都支持利用环境变量覆写,环境变量配置格式见docker-compose.yml。 |
|
读取优先级:环境变量 > config_private.py > config.py |
|
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- |
|
All the following configurations also support using environment variables to override, |
|
and the environment variable configuration format can be seen in docker-compose.yml. |
|
Configuration reading priority: environment variable > config_private.py > config.py |
|
""" |
|
|
|
|
|
API_KEY = "此处填API密钥" |
|
|
|
|
|
|
|
API_KEY = "此处填API密钥" |
|
|
|
|
|
|
|
USE_PROXY = False |
|
if USE_PROXY: |
|
""" |
|
填写格式是 [协议]:// [地址] :[端口],填写之前不要忘记把USE_PROXY改成True,如果直接在海外服务器部署,此处不修改 |
|
<配置教程&视频教程> https://github.com/binary-husky/gpt_academic/issues/1> |
|
[协议] 常见协议无非socks5h/http; 例如 v2**y 和 ss* 的默认本地协议是socks5h; 而cl**h 的默认本地协议是http |
|
[地址] 懂的都懂,不懂就填localhost或者127.0.0.1肯定错不了(localhost意思是代理软件安装在本机上) |
|
[端口] 在代理软件的设置里找。虽然不同的代理软件界面不一样,但端口号都应该在最显眼的位置上 |
|
""" |
|
|
|
proxies = { |
|
|
|
"http": "socks5h://localhost:11284", |
|
"https": "socks5h://localhost:11284", |
|
} |
|
else: |
|
proxies = None |
|
|
|
|
|
|
|
|
|
|
|
|
|
API_URL_REDIRECT = {} |
|
|
|
|
|
|
|
|
|
DEFAULT_WORKER_NUM = 3 |
|
|
|
|
|
|
|
CHATBOT_HEIGHT = 1115 |
|
|
|
|
|
|
|
CODE_HIGHLIGHT = True |
|
|
|
|
|
|
|
LAYOUT = "LEFT-RIGHT" |
|
DARK_MODE = True |
|
|
|
|
|
|
|
TIMEOUT_SECONDS = 30 |
|
|
|
|
|
|
|
WEB_PORT = -1 |
|
|
|
|
|
|
|
MAX_RETRY = 2 |
|
|
|
|
|
LLM_MODEL = "gpt-3.5-turbo" |
|
AVAIL_LLM_MODELS = ["gpt-3.5-turbo", "gpt-4", "api2d-gpt-4", "api2d-gpt-3.5-turbo", "spark", "azure-gpt-3.5"] |
|
|
|
|
|
ChatGLM_PTUNING_CHECKPOINT = "" |
|
|
|
|
|
|
|
LOCAL_MODEL_DEVICE = "cpu" |
|
LOCAL_MODEL_QUANT = "FP16" |
|
|
|
|
|
|
|
CONCURRENT_COUNT = 100 |
|
|
|
|
|
|
|
AUTO_CLEAR_TXT = False |
|
|
|
|
|
|
|
THEME = "Default" |
|
|
|
|
|
|
|
ADD_WAIFU = False |
|
|
|
|
|
|
|
|
|
AUTHENTICATION = [] |
|
|
|
|
|
|
|
CUSTOM_PATH = "/" |
|
|
|
|
|
|
|
API_ORG = "" |
|
|
|
|
|
|
|
SLACK_CLAUDE_BOT_ID = '' |
|
SLACK_CLAUDE_USER_TOKEN = '' |
|
|
|
|
|
|
|
AZURE_ENDPOINT = "https://你亲手写的api名称.openai.azure.com/" |
|
AZURE_API_KEY = "填入azure openai api的密钥" |
|
AZURE_ENGINE = "填入你亲手写的部署名" |
|
|
|
|
|
|
|
NEWBING_STYLE = "creative" |
|
NEWBING_COOKIES = """ |
|
put your new bing cookies here |
|
""" |
|
|
|
|
|
|
|
ENABLE_AUDIO = False |
|
ALIYUN_TOKEN="" |
|
ALIYUN_APPKEY="" |
|
ALIYUN_ACCESSKEY="" |
|
ALIYUN_SECRET="" |
|
|
|
|
|
|
|
XFYUN_APPID = "00000000" |
|
XFYUN_API_SECRET = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" |
|
XFYUN_API_KEY = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" |
|
|
|
|
|
|
|
ANTHROPIC_API_KEY = "" |
|
|
|
|
|
|
|
CUSTOM_API_KEY_PATTERN = "" |
|
|
|
|
|
|
|
HUGGINGFACE_ACCESS_TOKEN = "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" |
|
|
|
|
|
|
|
|
|
GROBID_URLS = [ |
|
"https://qingxu98-grobid.hf.space","https://qingxu98-grobid2.hf.space","https://qingxu98-grobid3.hf.space", |
|
"https://shaocongma-grobid.hf.space","https://FBR123-grobid.hf.space", |
|
] |
|
|
|
|
|
|
|
""" |
|
在线大模型配置关联关系示意图 |
|
│ |
|
├── "gpt-3.5-turbo" 等openai模型 |
|
│ ├── API_KEY |
|
│ ├── CUSTOM_API_KEY_PATTERN(不常用) |
|
│ ├── API_ORG(不常用) |
|
│ └── API_URL_REDIRECT(不常用) |
|
│ |
|
├── "azure-gpt-3.5" 等azure模型 |
|
│ ├── API_KEY |
|
│ ├── AZURE_ENDPOINT |
|
│ ├── AZURE_API_KEY |
|
│ ├── AZURE_ENGINE |
|
│ └── API_URL_REDIRECT |
|
│ |
|
├── "spark" 星火认知大模型 |
|
│ ├── XFYUN_APPID |
|
│ ├── XFYUN_API_SECRET |
|
│ └── XFYUN_API_KEY |
|
│ |
|
├── "claude-1-100k" 等claude模型 |
|
│ └── ANTHROPIC_API_KEY |
|
│ |
|
├── "stack-claude" |
|
│ ├── SLACK_CLAUDE_BOT_ID |
|
│ └── SLACK_CLAUDE_USER_TOKEN |
|
│ |
|
├── "qianfan" 百度千帆大模型库 |
|
│ ├── BAIDU_CLOUD_QIANFAN_MODEL |
|
│ ├── BAIDU_CLOUD_API_KEY |
|
│ └── BAIDU_CLOUD_SECRET_KEY |
|
│ |
|
├── "newbing" Newbing接口不再稳定,不推荐使用 |
|
├── NEWBING_STYLE |
|
└── NEWBING_COOKIES |
|
|
|
|
|
|
|
插件在线服务配置依赖关系示意图 |
|
│ |
|
├── 语音功能 |
|
│ ├── ENABLE_AUDIO |
|
│ ├── ALIYUN_TOKEN |
|
│ ├── ALIYUN_APPKEY |
|
│ ├── ALIYUN_ACCESSKEY |
|
│ └── ALIYUN_SECRET |
|
│ |
|
├── PDF文档精准解析 |
|
│ └── GROBID_URLS |
|
|
|
""" |
|
|