mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-15 11:07:10 +08:00
Merge Pull Request #686 into master
This commit is contained in:
@@ -56,7 +56,7 @@ class SDWebUI(Plugin):
|
||||
|
||||
if "help" in keywords or "帮助" in keywords:
|
||||
reply.type = ReplyType.INFO
|
||||
reply.content = self.get_help_text()
|
||||
reply.content = self.get_help_text(verbose = True)
|
||||
else:
|
||||
rule_params = {}
|
||||
rule_options = {}
|
||||
@@ -97,12 +97,16 @@ class SDWebUI(Plugin):
|
||||
finally:
|
||||
e_context['reply'] = reply
|
||||
|
||||
def get_help_text(self, **kwargs):
|
||||
def get_help_text(self, verbose = False, **kwargs):
|
||||
if not conf().get('image_create_prefix'):
|
||||
return "画图功能未启用"
|
||||
else:
|
||||
trigger = conf()['image_create_prefix'][0]
|
||||
help_text = f"请使用<{trigger}[关键词1] [关键词2]...:提示语>的格式作画,如\"{trigger}横版 高清:cat\"\n"
|
||||
help_text = "利用stable-diffusion来画图。\n"
|
||||
if not verbose:
|
||||
return help_text
|
||||
|
||||
help_text += f"使用方法:\n使用\"{trigger}[关键词1] [关键词2]...:提示语\"的格式作画,如\"{trigger}横版 高清:cat\"\n"
|
||||
help_text += "目前可用关键词:\n"
|
||||
for rule in self.rules:
|
||||
keywords = [f"[{keyword}]" for keyword in rule['keywords']]
|
||||
|
||||
Reference in New Issue
Block a user