mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-20 13:47:15 +08:00
fix: Default close tool plugin.
This commit is contained in:
@@ -21,15 +21,13 @@ from plugins import *
|
|||||||
class Tool(Plugin):
|
class Tool(Plugin):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
try:
|
|
||||||
self.handlers[Event.ON_HANDLE_CONTEXT] = self.on_handle_context
|
self.handlers[Event.ON_HANDLE_CONTEXT] = self.on_handle_context
|
||||||
self.app = self._reset_app()
|
self.app = self._reset_app()
|
||||||
if not self.tool_config.get("tools"):
|
if not self.tool_config.get("tools"):
|
||||||
|
logger.warn("[tool] init failed, ignore ")
|
||||||
raise Exception("config.json not found")
|
raise Exception("config.json not found")
|
||||||
logger.info("[tool] inited")
|
logger.info("[tool] inited")
|
||||||
except Exception as e:
|
|
||||||
logger.warn("[tool] init failed, ignore ")
|
|
||||||
raise e
|
|
||||||
|
|
||||||
def get_help_text(self, verbose=False, **kwargs):
|
def get_help_text(self, verbose=False, **kwargs):
|
||||||
help_text = "这是一个能让chatgpt联网,搜索,数字运算的插件,将赋予强大且丰富的扩展能力。"
|
help_text = "这是一个能让chatgpt联网,搜索,数字运算的插件,将赋予强大且丰富的扩展能力。"
|
||||||
|
|||||||
Reference in New Issue
Block a user