mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-02-22 08:28:42 +08:00
fix: do not draw when text_to_image is empty
This commit is contained in:
@@ -32,6 +32,9 @@ class LinkAIBot(Bot):
|
||||
if context.type == ContextType.TEXT:
|
||||
return self._chat(query, context)
|
||||
elif context.type == ContextType.IMAGE_CREATE:
|
||||
if not conf().get("text_to_image"):
|
||||
logger.warn("[LinkAI] text_to_image is not enabled, ignore the IMAGE_CREATE request")
|
||||
return Reply(ReplyType.TEXT, "")
|
||||
ok, res = self.create_img(query, 0)
|
||||
if ok:
|
||||
reply = Reply(ReplyType.IMAGE_URL, res)
|
||||
|
||||
Reference in New Issue
Block a user