JohnSmith9982 commited on
Commit
ce3c418
1 Parent(s): 5e2961c

Update modules/config.py

Browse files
Files changed (1) hide show
  1. modules/config.py +2 -1
modules/config.py CHANGED
@@ -69,7 +69,8 @@ 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
 
73
 
74
  ## 多账户机制
75
  multi_api_key = config.get("multi_api_key", False) # 是否开启多账户机制
 
69
  my_api_key = os.environ.get("OPENAI_API_KEY", my_api_key)
70
 
71
  xmchat_api_key = config.get("xmchat_api_key", "")
72
+ if os.environ.get("XMCHAT_API_KEY", None) == None:
73
+ os.environ["XMCHAT_API_KEY"] = xmchat_api_key
74
 
75
  ## 多账户机制
76
  multi_api_key = config.get("multi_api_key", False) # 是否开启多账户机制