Skip to content

Commit

Permalink
fix: linkai instruction bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zhayujie committed Sep 25, 2023
1 parent a1aa925 commit c03e31b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plugins/linkai/linkai.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ def _process_admin_cmd(self, e_context: EventContext):
# 保存插件配置
super().save_config(self.config)
_set_reply_text(f"应用设置成功: {app_code}", e_context, level=ReplyType.INFO)
return

if len(cmd) == 3 and cmd[1] == "sum" and (cmd[2] == "open" or cmd[2] == "close"):
# 知识库开关指令
Expand All @@ -176,11 +177,12 @@ def _process_admin_cmd(self, e_context: EventContext):
else:
self.sum_config["enabled"] = is_open
_set_reply_text(f"文章总结功能{tips_text}", e_context, level=ReplyType.INFO)
else:
_set_reply_text(f"指令错误,请输入{_get_trigger_prefix()}linkai help 获取帮助", e_context,
level=ReplyType.INFO)
return

_set_reply_text(f"指令错误,请输入{_get_trigger_prefix()}linkai help 获取帮助", e_context,
level=ReplyType.INFO)
return

def _is_summary_open(self, context) -> bool:
if not self.sum_config or not self.sum_config.get("enabled"):
return False
Expand Down

0 comments on commit c03e31b

Please sign in to comment.