From 6acb3b79ecac2b1f90bdb0dcd79900b6dd8f6113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Thu, 25 Jan 2024 11:46:03 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/plugins/ai.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugin/plugins/ai.go b/plugin/plugins/ai.go index 12ce3c4..2e6bfe0 100644 --- a/plugin/plugins/ai.go +++ b/plugin/plugins/ai.go @@ -123,6 +123,12 @@ func AI(m *plugin.MessageContext) { return } + // 返回消息为空 + if resp.Choices[0].Message.Content == "" { + utils.SendMessage(m.FromUser, m.GroupUser, "AI似乎抽风了,没有告诉我你需要的回答~", 0) + return + } + // 保存一下AI 返回的消息,消息 Id 使用传入 Id 的负数 var replyMessage entity.Message replyMessage.MsgId = -m.MsgId -- 2.45.2