diff --git a/plugins/linkai/README.md b/plugins/linkai/README.md index 043d436..2ac80b1 100644 --- a/plugins/linkai/README.md +++ b/plugins/linkai/README.md @@ -26,7 +26,7 @@ "enabled": true, # 文档总结和对话功能开关 "group_enabled": true, # 是否支持群聊开启 "max_file_size": 5000, # 文件的大小限制,单位KB,默认为5M,超过该大小直接忽略 - "type": ["FILE", "SHARING", "IMAGE"] # 支持总结的类型,分别表示 文件、分享链接、图片 + "type": ["FILE", "SHARING", "IMAGE"] # 支持总结的类型,分别表示 文件、分享链接、图片,其中文件和链接默认打开,图片默认关闭 } } ``` diff --git a/plugins/linkai/config.json.template b/plugins/linkai/config.json.template index b6c7a04..547b8ef 100644 --- a/plugins/linkai/config.json.template +++ b/plugins/linkai/config.json.template @@ -15,6 +15,6 @@ "enabled": true, "group_enabled": true, "max_file_size": 5000, - "type": ["FILE", "SHARING", "IMAGE"] + "type": ["FILE", "SHARING"] } } diff --git a/plugins/linkai/linkai.py b/plugins/linkai/linkai.py index 9e35bcd..7978743 100644 --- a/plugins/linkai/linkai.py +++ b/plugins/linkai/linkai.py @@ -192,9 +192,7 @@ class LinkAI(Plugin): return False if context.kwargs.get("isgroup") and not self.sum_config.get("group_enabled"): return False - support_type = self.sum_config.get("type") - if not support_type: - return True + support_type = self.sum_config.get("type") or ["FILE", "SHARING"] if context.type.name not in support_type: return False return True