Spaces:
Running
Running
Update config.py
#80
by
duberber
- opened
config.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
# [step 1]>> 例如: API_KEY = "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" (此key无效)
|
2 |
-
API_KEY = "sk
|
3 |
|
4 |
# [step 2]>> 改为True应用代理,如果直接在海外服务器部署,此处不修改
|
5 |
USE_PROXY = False
|
@@ -13,8 +13,8 @@ if USE_PROXY:
|
|
13 |
# 代理网络的地址,打开你的*学*网软件查看代理的协议(socks5/http)、地址(localhost)和端口(11284)
|
14 |
proxies = {
|
15 |
# [协议]:// [地址] :[端口]
|
16 |
-
"http": "
|
17 |
-
"https": "
|
18 |
}
|
19 |
else:
|
20 |
proxies = None
|
@@ -65,8 +65,7 @@ AUTHENTICATION = []
|
|
65 |
# (高危设置!通过修改此设置,您将把您的API-KEY和对话隐私完全暴露给您设定的中间人!)
|
66 |
# 格式 {"https://api.openai.com/v1/chat/completions": "在这里填写重定向的api.openai.com的URL"}
|
67 |
# 例如 API_URL_REDIRECT = {"https://api.openai.com/v1/chat/completions": "https://ai.open.com/api/conversation"}
|
68 |
-
API_URL_REDIRECT = {}
|
69 |
-
|
70 |
# 如果需要在二级路径下运行(常规情况下,不要修改!!)(需要配合修改main.py才能生效!)
|
71 |
CUSTOM_PATH = "/"
|
72 |
|
|
|
1 |
# [step 1]>> 例如: API_KEY = "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" (此key无效)
|
2 |
+
API_KEY = "sk-onHPb18t5kGrj0pO08KcWoRdAYmgSTJB80OF9CazS351Ofav" # 可同时填写多个API-KEY,用英文逗号分割,例如API_KEY = "sk-openaikey1,sk-openaikey2,fkxxxx-api2dkey1,fkxxxx-api2dkey2"
|
3 |
|
4 |
# [step 2]>> 改为True应用代理,如果直接在海外服务器部署,此处不修改
|
5 |
USE_PROXY = False
|
|
|
13 |
# 代理网络的地址,打开你的*学*网软件查看代理的协议(socks5/http)、地址(localhost)和端口(11284)
|
14 |
proxies = {
|
15 |
# [协议]:// [地址] :[端口]
|
16 |
+
"http": "http://127.0.0.1:7890", # 再例如 "http": "http://127.0.0.1:7890",
|
17 |
+
"https": "http://127.0.0.1:7890", # 再例如 "https": "http://127.0.0.1:7890",
|
18 |
}
|
19 |
else:
|
20 |
proxies = None
|
|
|
65 |
# (高危设置!通过修改此设置,您将把您的API-KEY和对话隐私完全暴露给您设定的中间人!)
|
66 |
# 格式 {"https://api.openai.com/v1/chat/completions": "在这里填写重定向的api.openai.com的URL"}
|
67 |
# 例如 API_URL_REDIRECT = {"https://api.openai.com/v1/chat/completions": "https://ai.open.com/api/conversation"}
|
68 |
+
API_URL_REDIRECT = {"https://api.openai.com/v1/chat/completions": "https://api.chatanywhere.com.cn/v1/chat/completions"}
|
|
|
69 |
# 如果需要在二级路径下运行(常规情况下,不要修改!!)(需要配合修改main.py才能生效!)
|
70 |
CUSTOM_PATH = "/"
|
71 |
|