From 2812a5026cef35c71a36eacb7acfcd599ab317d1 Mon Sep 17 00:00:00 2001 From: zhayujie Date: Tue, 5 Mar 2024 20:56:37 +0800 Subject: [PATCH 1/6] Update README.md --- README.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/README.md b/README.md index 46541d0..e767784 100644 --- a/README.md +++ b/README.md @@ -17,17 +17,6 @@ https://github.com/zhayujie/chatgpt-on-wechat/assets/26161723/d5154020-36e3-41db Demo made by [Visionn](https://www.wangpc.cc/) -# 商业支持 - -> 我们还提供企业级的 **AI应用平台**,包含知识库、Agent插件、应用管理等能力,支持多平台聚合的应用接入、客户端管理、对话管理,以及提供 -SaaS服务、私有化部署、稳定托管接入 等多种模式。 -> -> 目前已在私域运营、智能客服、企业效率助手等场景积累了丰富的 AI 解决方案, 在电商、文教、健康、新消费等各行业沉淀了 AI 落地的最佳实践,致力于打造助力中小企业拥抱 AI 的一站式平台。 - -企业服务和商用咨询可联系产品顾问: - - - # 开源社区 添加小助手微信加入开源项目交流群: From 07e10a79437589d5ba22f5ebe05d6ec0fe3fc88b Mon Sep 17 00:00:00 2001 From: zhayujie Date: Fri, 8 Mar 2024 00:19:59 +0800 Subject: [PATCH 2/6] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index e767784..dadf801 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,16 @@ https://github.com/zhayujie/chatgpt-on-wechat/assets/26161723/d5154020-36e3-41db Demo made by [Visionn](https://www.wangpc.cc/) +# 商业支持 + +> 我们还提供企业级的 **AI应用平台**,包含知识库、Agent插件、应用管理等能力,支持多平台聚合的应用接入、客户端管理、对话管理,以及提供 +SaaS服务、私有化部署、稳定托管接入 等多种模式。 +> +> 目前已在私域运营、智能客服、企业效率助手等场景积累了丰富的 AI 解决方案, 在电商、文教、健康、新消费等各行业沉淀了 AI 落地的最佳实践,致力于打造助力中小企业拥抱 AI 的一站式平台。 +企业服务和商用咨询可联系产品顾问: + + + # 开源社区 添加小助手微信加入开源项目交流群: From 283ad48b8645ccdeb3f9b504c1fd24f8f1a8a2e1 Mon Sep 17 00:00:00 2001 From: goldfishh Date: Sun, 10 Mar 2024 13:11:45 +0800 Subject: [PATCH 3/6] disable plugin(tool) log printing --- plugins/tool/tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tool/tool.py b/plugins/tool/tool.py index c80a945..a2ce4b6 100644 --- a/plugins/tool/tool.py +++ b/plugins/tool/tool.py @@ -137,7 +137,7 @@ class Tool(Plugin): return { # 全局配置相关 - "log": True, # tool 日志开关 + "log": False, # tool 日志开关 "debug": kwargs.get("debug", False), # 输出更多日志 "no_default": kwargs.get("no_default", False), # 不要默认的工具,只加载自己导入的工具 "think_depth": kwargs.get("think_depth", 2), # 一个问题最多使用多少次工具 From 8093fcc64ca919fd8e16709b5fb4e8812a183a16 Mon Sep 17 00:00:00 2001 From: "rowan.wu" <> Date: Sat, 16 Mar 2024 12:34:40 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=A4=E5=A4=84BUG=201?= =?UTF-8?q?=E3=80=81=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89=E4=B8=AD=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E4=BA=86=E9=A9=BC=E5=B3=B0=EF=BC=8C=E4=BD=86=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E4=BD=8D=E7=BD=AE=E4=BD=BF=E7=94=A8=E7=9A=84=E5=A4=A7?= =?UTF-8?q?=E5=86=99=202=E3=80=81=E5=BE=AE=E4=BF=A1channel=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E5=8F=91=E9=80=81IMAGE=EF=BC=8C=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E4=BA=86seek=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bridge/reply.py | 2 +- channel/wechat/wechat_channel.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/bridge/reply.py b/bridge/reply.py index 0031484..f2293bd 100644 --- a/bridge/reply.py +++ b/bridge/reply.py @@ -11,7 +11,7 @@ class ReplyType(Enum): VIDEO_URL = 5 # 视频URL FILE = 6 # 文件 CARD = 7 # 微信名片,仅支持ntchat - InviteRoom = 8 # 邀请好友进群 + INVITE_ROOM = 8 # 邀请好友进群 INFO = 9 ERROR = 10 TEXT_ = 11 # 强制文本 diff --git a/channel/wechat/wechat_channel.py b/channel/wechat/wechat_channel.py index 717b068..a65269c 100644 --- a/channel/wechat/wechat_channel.py +++ b/channel/wechat/wechat_channel.py @@ -233,7 +233,6 @@ class WechatChannel(ChatChannel): logger.info("[WX] sendImage url={}, receiver={}".format(img_url, receiver)) elif reply.type == ReplyType.IMAGE: # 从文件读取图片 image_storage = reply.content - image_storage.seek(0) itchat.send_image(image_storage, toUserName=receiver) logger.info("[WX] sendImage, receiver={}".format(receiver)) elif reply.type == ReplyType.FILE: # 新增文件回复类型 From a2bc22c37dcd8e2658006a9629f9357e85819a37 Mon Sep 17 00:00:00 2001 From: 13476573407 <1062424570@qq.com> Date: Mon, 18 Mar 2024 14:40:01 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E7=94=B1=E4=BA=8E=E4=BD=BF=E7=94=A8#scanp?= =?UTF-8?q?=E5=92=8C#reloadp=E6=89=AB=E6=8F=8F=E6=8F=92=E4=BB=B6=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=BD=93=E6=9B=B4=E6=96=B0=E6=8F=92=E4=BB=B6=E4=BB=A5?= =?UTF-8?q?=E5=90=8E=E5=B9=B6=E4=B8=8D=E4=BC=9A=E5=AE=9E=E7=8E=B0=E9=87=8D?= =?UTF-8?q?=E8=BD=BD=E6=96=B0=E7=9A=84=E6=8F=92=E4=BB=B6=20=E6=89=80?= =?UTF-8?q?=E4=BB=A5=E5=8F=96=E6=B6=88=E4=BA=86=E5=B7=B2=E8=BD=BD=E5=85=A5?= =?UTF-8?q?=E7=9A=84=E6=8F=92=E4=BB=B6=E5=88=A4=E6=96=AD=E9=87=8D=E8=BD=BD?= =?UTF-8?q?=E9=99=A4Godcmd=E4=BB=A5=E5=A4=96=E7=9A=84=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E6=9D=A5=E5=AE=9E=E7=8E=B0=E4=B8=8D=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E9=87=8D=E5=90=AF=E9=A1=B9=E7=9B=AE=E5=8D=B3=E5=8F=AF?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/plugin_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/plugin_manager.py b/plugins/plugin_manager.py index 49c13ca..8433e8f 100644 --- a/plugins/plugin_manager.py +++ b/plugins/plugin_manager.py @@ -99,7 +99,7 @@ class PluginManager: try: self.current_plugin_path = plugin_path if plugin_path in self.loaded: - if self.loaded[plugin_path] == None: + if plugin_name.upper() != 'GODCMD': logger.info("reload module %s" % plugin_name) self.loaded[plugin_path] = importlib.reload(sys.modules[import_path]) dependent_module_names = [name for name in sys.modules.keys() if name.startswith(import_path + ".")] @@ -141,7 +141,7 @@ class PluginManager: failed_plugins = [] for name, plugincls in self.plugins.items(): if plugincls.enabled: - if name not in self.instances: + # if name not in self.instances: try: instance = plugincls() except Exception as e: From 15e070232994c8ec195319b6ce3279ad7afd3a4b Mon Sep 17 00:00:00 2001 From: 13476573407 <1062424570@qq.com> Date: Wed, 20 Mar 2024 10:52:34 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=BD=BF=E7=94=A8scanp?= =?UTF-8?q?=E9=87=8D=E8=BD=BD=E6=97=B6=E4=BC=9A=E9=87=8D=E6=96=B0=E7=94=9F?= =?UTF-8?q?=E6=88=90godcmd=E7=9A=84=E5=AE=9E=E4=BE=8B=EF=BC=8C=E5=AF=BC?= =?UTF-8?q?=E8=87=B4auth=E6=9D=83=E9=99=90=E8=A2=AB=E6=B8=85=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/plugin_manager.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/plugins/plugin_manager.py b/plugins/plugin_manager.py index 8433e8f..cecf75d 100644 --- a/plugins/plugin_manager.py +++ b/plugins/plugin_manager.py @@ -141,19 +141,21 @@ class PluginManager: failed_plugins = [] for name, plugincls in self.plugins.items(): if plugincls.enabled: + if 'GODCMD' in self.instances and name == 'GODCMD': + continue # if name not in self.instances: - try: - instance = plugincls() - except Exception as e: - logger.warn("Failed to init %s, diabled. %s" % (name, e)) - self.disable_plugin(name) - failed_plugins.append(name) - continue - self.instances[name] = instance - for event in instance.handlers: - if event not in self.listening_plugins: - self.listening_plugins[event] = [] - self.listening_plugins[event].append(name) + try: + instance = plugincls() + except Exception as e: + logger.warn("Failed to init %s, diabled. %s" % (name, e)) + self.disable_plugin(name) + failed_plugins.append(name) + continue + self.instances[name] = instance + for event in instance.handlers: + if event not in self.listening_plugins: + self.listening_plugins[event] = [] + self.listening_plugins[event].append(name) self.refresh_order() return failed_plugins