Skip to content

Commit

Permalink
Merge pull request zhayujie#2203 from 6vision/fix_issues
Browse files Browse the repository at this point in the history
Fix issues
  • Loading branch information
6vision authored Aug 2, 2024
2 parents 29f1699 + b544a4c commit 49f2339
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion channel/dingtalk/dingtalk_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def __init__(self):
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))
# 无需群校验和前缀
Expand Down
2 changes: 1 addition & 1 deletion channel/wechat/wechat_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion plugins/role/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ def on_handle_context(self, e_context: EventContext):
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[:]
Expand Down

0 comments on commit 49f2339

Please sign in to comment.