瀏覽代碼

Merge pull request #2203 from 6vision/fix_issues

Fix issues
master
vision GitHub 3 月之前
父節點
當前提交
49f2339cc2
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: B5690EEEBB952194
共有 3 個檔案被更改,包括 4 行新增3 行删除
  1. +1
    -1
      channel/dingtalk/dingtalk_channel.py
  2. +1
    -1
      channel/wechat/wechat_channel.py
  3. +2
    -1
      plugins/role/role.py

+ 1
- 1
channel/dingtalk/dingtalk_channel.py 查看文件

@@ -100,7 +100,7 @@ class DingTalkChanel(ChatChannel, dingtalk_stream.ChatbotHandler):
super(dingtalk_stream.ChatbotHandler, self).__init__()
self.logger = self.setup_logger()
# 历史消息id暂存,用于幂等控制
self.receivedMsgs = ExpiredDict(conf().get("expires_in_seconds"))
self.receivedMsgs = ExpiredDict(conf().get("expires_in_seconds", 3600))
logger.info("[DingTalk] client_id={}, client_secret={} ".format(
self.dingtalk_client_id, self.dingtalk_client_secret))
# 无需群校验和前缀


+ 1
- 1
channel/wechat/wechat_channel.py 查看文件

@@ -109,7 +109,7 @@ class WechatChannel(ChatChannel):

def __init__(self):
super().__init__()
self.receivedMsgs = ExpiredDict(conf().get("expires_in_seconds"))
self.receivedMsgs = ExpiredDict(conf().get("expires_in_seconds", 3600))
self.auto_login_times = 0

def startup(self):


+ 2
- 1
plugins/role/role.py 查看文件

@@ -99,7 +99,8 @@ class Role(Plugin):
if e_context["context"].type != ContextType.TEXT:
return
btype = Bridge().get_bot_type("chat")
if btype not in [const.OPEN_AI, const.CHATGPT, const.CHATGPTONAZURE, const.LINKAI]:
if btype not in [const.OPEN_AI, const.CHATGPT, const.CHATGPTONAZURE, const.QWEN_DASHSCOPE, const.XUNFEI, const.BAIDU, const.ZHIPU_AI, const.MOONSHOT, const.MiniMax]:
logger.warn(f'不支持的bot: {btype}')
return
bot = Bridge().get_bot("chat")
content = e_context["context"].content[:]


Loading…
取消
儲存