mirror of
https://github.com/zhayujie/bot-on-anything.git
synced 2026-02-28 08:41:36 +08:00
fix: proxy fail on windows 11
This commit is contained in:
7
app.py
7
app.py
@@ -3,12 +3,19 @@
|
||||
import config
|
||||
from channel import channel_factory
|
||||
from common import log
|
||||
import os
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
# load config
|
||||
config.load_config()
|
||||
|
||||
proxy = config.conf().get("model").get("openai").get("proxy")
|
||||
if proxy:
|
||||
os.environ['http_proxy'] = proxy
|
||||
os.environ['https_proxy'] = proxy
|
||||
print(os.environ)
|
||||
|
||||
model_type = config.conf().get("model").get("type")
|
||||
channel_type = config.conf().get("channel").get("type")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user