Spaces:
Running
Running
Update config.py
Browse files
config.py
CHANGED
@@ -2,22 +2,22 @@
|
|
2 |
以下所有配置也都支持利用环境变量覆写,环境变量配置格式见docker-compose.yml。
|
3 |
读取优先级:环境变量 > config_private.py > config.py
|
4 |
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
5 |
-
All the following configurations also support using environment variables to override,
|
6 |
-
and the environment variable configuration format can be seen in docker-compose.yml.
|
7 |
-
Configuration reading priority: environment variable > config_private.py > config.py
|
8 |
"""
|
9 |
|
10 |
# [step 1]>> API_KEY = "sk-123456789xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx123456789"。极少数情况下,还需要填写组织(格式如org-123456789abcdefghijklmno的),请向下翻,找 API_ORG 设置项
|
11 |
-
API_KEY = "
|
12 |
|
13 |
|
14 |
# [step 1]>> API_KEY = "sk-123456789xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx123456789"。极少数情况下,还需要填写组织(格式如org-123456789abcdefghijklmno的),请向下翻,找 API_ORG 设置项
|
15 |
-
API_KEY = "
|
16 |
|
17 |
|
18 |
# [step 2]>> 改为True应用代理,如果直接在海外服务器部署,此处不修改;如果使用本地或无地域限制的大模型时,此处也不需要修改
|
19 |
-
USE_PROXY = False
|
20 |
-
if USE_PROXY:
|
21 |
"""
|
22 |
填写格式是 [协议]:// [地址] :[端口],填写之前不要忘记把USE_PROXY改成True,如果直接在海外服务器部署,此处不修改
|
23 |
<配置教程&视频教程> https://github.com/binary-husky/gpt_academic/issues/1>
|
@@ -28,8 +28,8 @@ if USE_PROXY:
|
|
28 |
# 代理网络的地址,打开你的*学*网软件查看代理的协议(socks5h / http)、地址(localhost)和端口(11284)
|
29 |
proxies = {
|
30 |
# [协议]:// [地址] :[端口]
|
31 |
-
"http": "
|
32 |
-
"https": "
|
33 |
}
|
34 |
else:
|
35 |
proxies = None
|
@@ -57,7 +57,7 @@ CHATBOT_HEIGHT = 1115
|
|
57 |
|
58 |
|
59 |
# 代码高亮
|
60 |
-
CODE_HIGHLIGHT = True
|
61 |
|
62 |
|
63 |
# 窗口布局
|
@@ -203,7 +203,7 @@ PATH_LOGGING = "gpt_log"
|
|
203 |
├── "azure-gpt-3.5" 等azure模型
|
204 |
│ ├── API_KEY
|
205 |
│ ├── AZURE_ENDPOINT
|
206 |
-
│ ├── AZURE_API_KEY
|
207 |
│ ├── AZURE_ENGINE
|
208 |
│ └── API_URL_REDIRECT
|
209 |
│
|
|
|
2 |
以下所有配置也都支持利用环境变量覆写,环境变量配置格式见docker-compose.yml。
|
3 |
读取优先级:环境变量 > config_private.py > config.py
|
4 |
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
5 |
+
All the following configurations also support using environment variables to override,
|
6 |
+
and the environment variable configuration format can be seen in docker-compose.yml.
|
7 |
+
Configuration reading priority: environment variable > config_private.py > config.py
|
8 |
"""
|
9 |
|
10 |
# [step 1]>> API_KEY = "sk-123456789xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx123456789"。极少数情况下,还需要填写组织(格式如org-123456789abcdefghijklmno的),请向下翻,找 API_ORG 设置项
|
11 |
+
API_KEY = "sk-z1VfsYzJ5tEYChxcjjvXYcs5t1CEDntyYOzmS3DGyMCyzyMN" # 可同时填写多个API-KEY,用英文逗号分割,例如API_KEY = "sk-openaikey1,sk-openaikey2,fkxxxx-api2dkey3,azure-apikey4"
|
12 |
|
13 |
|
14 |
# [step 1]>> API_KEY = "sk-123456789xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx123456789"。极少数情况下,还需要填写组织(格式如org-123456789abcdefghijklmno的),请向下翻,找 API_ORG 设置项
|
15 |
+
API_KEY = "sk-z1VfsYzJ5tEYChxcjjvXYcs5t1CEDntyYOzmS3DGyMCyzyMN" # 可同时填写多个API-KEY,用英文逗号分割,例如API_KEY = "sk-openaikey1,sk-openaikey2,fkxxxx-api2dkey3,azure-apikey4"
|
16 |
|
17 |
|
18 |
# [step 2]>> 改为True应用代理,如果直接在海外服务器部署,此处不修改;如果使用本地或无地域限制的大模型时,此处也不需要修改
|
19 |
+
USE_PROXY = False
|
20 |
+
if USE_PROXY:
|
21 |
"""
|
22 |
填写格式是 [协议]:// [地址] :[端口],填写之前不要忘记把USE_PROXY改成True,如果直接在海外服务器部署,此处不修改
|
23 |
<配置教程&视频教程> https://github.com/binary-husky/gpt_academic/issues/1>
|
|
|
28 |
# 代理网络的地址,打开你的*学*网软件查看代理的协议(socks5h / http)、地址(localhost)和端口(11284)
|
29 |
proxies = {
|
30 |
# [协议]:// [地址] :[端口]
|
31 |
+
"http": "http://127.0.0.1:7980", # 再例如 "http": "http://127.0.0.1:7890",
|
32 |
+
"https": "http://127.0.0.1:7980", # 再例如 "https": "http://127.0.0.1:7890",
|
33 |
}
|
34 |
else:
|
35 |
proxies = None
|
|
|
57 |
|
58 |
|
59 |
# 代码高亮
|
60 |
+
CODE_HIGHLIGHT = True
|
61 |
|
62 |
|
63 |
# 窗口布局
|
|
|
203 |
├── "azure-gpt-3.5" 等azure模型
|
204 |
│ ├── API_KEY
|
205 |
│ ├── AZURE_ENDPOINT
|
206 |
+
│ ├── AZURE_API_KEY
|
207 |
│ ├── AZURE_ENGINE
|
208 |
│ └── API_URL_REDIRECT
|
209 |
│
|