feat: bing支持自定义代理地址
This commit is contained in:
+1
-1
@@ -121,7 +121,7 @@ cnt_valid = 0
|
||||
# 新版配置文件
|
||||
cc.init_attributes(["qq_forward_threshold"], 200)
|
||||
cc.init_attributes(["qq_welcome"], "欢迎加入本群!\n欢迎给https://github.com/Soulter/QQChannelChatGPT项目一个Star😊~\n输入help查看帮助~\n")
|
||||
|
||||
cc.init_attributes(["bing_proxy"], "")
|
||||
|
||||
def new_sub_thread(func, args=()):
|
||||
thread = threading.Thread(target=func, args=args, daemon=True)
|
||||
|
||||
@@ -3,6 +3,7 @@ from EdgeGPT import Chatbot, ConversationStyle
|
||||
import json
|
||||
import os
|
||||
from util import general_utils as gu
|
||||
from util.cmd_config import CmdConfig as cc
|
||||
|
||||
|
||||
class ProviderRevEdgeGPT(Provider):
|
||||
@@ -11,7 +12,10 @@ class ProviderRevEdgeGPT(Provider):
|
||||
self.wait_stack = []
|
||||
with open('./cookies.json', 'r') as f:
|
||||
cookies = json.load(f)
|
||||
self.bot = Chatbot(cookies=cookies)
|
||||
proxy = cc.get("bing_proxy", None)
|
||||
if proxy == "":
|
||||
proxy = None
|
||||
self.bot = Chatbot(cookies=cookies, proxy = proxy)
|
||||
|
||||
def is_busy(self):
|
||||
return self.busy
|
||||
|
||||
Reference in New Issue
Block a user