Default close tool plugin.

This commit is contained in:
6vision
2024-07-30 23:14:23 +08:00
parent 000c2029de
commit 55ca652ad8

View File

@@ -21,11 +21,15 @@ from plugins import *
class Tool(Plugin):
def __init__(self):
super().__init__()
try:
self.handlers[Event.ON_HANDLE_CONTEXT] = self.on_handle_context
self.app = self._reset_app()
if not self.tool_config.get("tools"):
raise Exception("config.json not found")
logger.info("[tool] inited")
except Exception as e:
logger.warn("[tool] init failed, ignore ")
raise e
def get_help_text(self, verbose=False, **kwargs):
help_text = "这是一个能让chatgpt联网搜索数字运算的插件将赋予强大且丰富的扩展能力。"