Spaces:
Sleeping
Sleeping
Tuchuanhuhuhu commited on
Commit ·
d7d79a0
1
Parent(s): a366e21
修改环境变量名称
Browse files- modules/config.py +2 -2
modules/config.py
CHANGED
|
@@ -33,7 +33,7 @@ else:
|
|
| 33 |
config = {}
|
| 34 |
|
| 35 |
lang_config = config.get("language", "auto")
|
| 36 |
-
language = os.environ.get("
|
| 37 |
|
| 38 |
if os.path.exists("api_key.txt"):
|
| 39 |
logging.info("检测到api_key.txt文件,正在进行迁移...")
|
|
@@ -66,7 +66,7 @@ if os.environ.get("dockerrun") == "yes":
|
|
| 66 |
|
| 67 |
## 处理 api-key 以及 允许的用户列表
|
| 68 |
my_api_key = config.get("openai_api_key", "")
|
| 69 |
-
my_api_key = os.environ.get("
|
| 70 |
|
| 71 |
xmchat_api_key = config.get("xmchat_api_key", "")
|
| 72 |
os.environ["XMCHAT_API_KEY"] = xmchat_api_key
|
|
|
|
| 33 |
config = {}
|
| 34 |
|
| 35 |
lang_config = config.get("language", "auto")
|
| 36 |
+
language = os.environ.get("LANGUAGE", lang_config)
|
| 37 |
|
| 38 |
if os.path.exists("api_key.txt"):
|
| 39 |
logging.info("检测到api_key.txt文件,正在进行迁移...")
|
|
|
|
| 66 |
|
| 67 |
## 处理 api-key 以及 允许的用户列表
|
| 68 |
my_api_key = config.get("openai_api_key", "")
|
| 69 |
+
my_api_key = os.environ.get("OPENAI_API_KEY", my_api_key)
|
| 70 |
|
| 71 |
xmchat_api_key = config.get("xmchat_api_key", "")
|
| 72 |
os.environ["XMCHAT_API_KEY"] = xmchat_api_key
|