@@ -16,7 +16,10 @@ class BaiduWenxinBot(Bot): | |||||
def __init__(self): | def __init__(self): | ||||
super().__init__() | super().__init__() | ||||
self.sessions = SessionManager(BaiduWenxinSession, model=conf().get("baidu_wenxin_model") or "eb-instant") | |||||
wenxin_model = conf().get("baidu_wenxin_model") or "eb-instant" | |||||
if conf().get("model") and conf().get("model") == "wenxin-4": | |||||
wenxin_model = "completions_pro" | |||||
self.sessions = SessionManager(BaiduWenxinSession, model=wenxin_model) | |||||
def reply(self, query, context=None): | def reply(self, query, context=None): | ||||
# acquire reply content | # acquire reply content | ||||
@@ -23,7 +23,7 @@ class Bridge(object): | |||||
self.btype["chat"] = const.OPEN_AI | self.btype["chat"] = const.OPEN_AI | ||||
if conf().get("use_azure_chatgpt", False): | if conf().get("use_azure_chatgpt", False): | ||||
self.btype["chat"] = const.CHATGPTONAZURE | self.btype["chat"] = const.CHATGPTONAZURE | ||||
if model_type in ["wenxin"]: | |||||
if model_type in ["wenxin", "wenxin-4"]: | |||||
self.btype["chat"] = const.BAIDU | self.btype["chat"] = const.BAIDU | ||||
if model_type in ["xunfei"]: | if model_type in ["xunfei"]: | ||||
self.btype["chat"] = const.XUNFEI | self.btype["chat"] = const.XUNFEI | ||||
@@ -5,8 +5,6 @@ BAIDU = "baidu" | |||||
XUNFEI = "xunfei" | XUNFEI = "xunfei" | ||||
CHATGPTONAZURE = "chatGPTOnAzure" | CHATGPTONAZURE = "chatGPTOnAzure" | ||||
LINKAI = "linkai" | LINKAI = "linkai" | ||||
VERSION = "1.3.0" | |||||
CLAUDEAI = "claude" | CLAUDEAI = "claude" | ||||
MODEL_LIST = ["gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-4", "wenxin", "xunfei","claude"] | |||||
MODEL_LIST = ["gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-4", "wenxin", "wenxin-4", "xunfei", "claude"] |