Bladeren bron

fix: Default close tool plugin.

master
6vision 4 maanden geleden
bovenliggende
commit
c4f10fe876
1 gewijzigde bestanden met toevoegingen van 6 en 8 verwijderingen
  1. +6
    -8
      plugins/tool/tool.py

+ 6
- 8
plugins/tool/tool.py Bestand weergeven

@@ -21,15 +21,13 @@ 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:
self.handlers[Event.ON_HANDLE_CONTEXT] = self.on_handle_context
self.app = self._reset_app()
if not self.tool_config.get("tools"):
logger.warn("[tool] init failed, ignore ")
raise e
raise Exception("config.json not found")
logger.info("[tool] inited")


def get_help_text(self, verbose=False, **kwargs):
help_text = "这是一个能让chatgpt联网,搜索,数字运算的插件,将赋予强大且丰富的扩展能力。"


Laden…
Annuleren
Opslaan