Skip to content

Commit

Permalink
plugins : provide help url when plugin init failed
Browse files Browse the repository at this point in the history
  • Loading branch information
lanvent committed Mar 26, 2023
1 parent b3cabd9 commit 167f10c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugins/banwords/banwords.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self):
self.handlers[Event.ON_HANDLE_CONTEXT] = self.on_handle_context
logger.info("[Banwords] inited")
except Exception as e:
logger.warn("Banwords init failed: %s" % e)
logger.warn("Banwords init failed: %s, ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/banwords ." % e)



Expand Down
4 changes: 2 additions & 2 deletions plugins/role/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def __init__(self):
self.roleplays = {}
logger.info("[Role] inited")
except FileNotFoundError:
logger.error(f"[Role] init failed, {config_path} not found")
logger.warn(f"[Role] init failed, {config_path} not found, ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/role .")
except Exception as e:
logger.error("[Role] init failed, exception: %s" % e)
logger.warn("[Role] init failed, exception: %s, ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/role ." % e)

def get_role(self, name, find_closest=True):
name = name.lower()
Expand Down
4 changes: 2 additions & 2 deletions plugins/sdwebui/sdwebui.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def __init__(self):
self.handlers[Event.ON_HANDLE_CONTEXT] = self.on_handle_context
logger.info("[SD] inited")
except FileNotFoundError:
logger.error(f"[SD] init failed, {config_path} not found")
logger.warn(f"[SD] init failed, {config_path} not found, ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/sdwebui .")
except Exception as e:
logger.error("[SD] init failed, exception: %s" % e)
logger.warn("[SD] init failed, exception: %s, ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/sdwebui ." % e)

def on_handle_context(self, e_context: EventContext):

Expand Down

0 comments on commit 167f10c

Please sign in to comment.