From b2598f2406aecf23abd848ca18f8473d5ddbbb9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Fri, 31 May 2024 07:27:17 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=B6=88=E6=81=AF=E6=80=BB=E7=BB=93?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BC=A0=E5=85=A5=E7=BE=A4=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=92=8C=E8=BF=87=E6=BB=A4=E6=8E=92=E8=A1=8C=E6=A6=9C=E5=8F=8A?= =?UTF-8?q?=E5=89=8D=E4=B8=80=E5=A4=A9=E7=9A=84=E6=80=BB=E7=BB=93=E6=B6=88?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/message.go | 2 ++ tasks/summary/summary.go | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/service/message.go b/service/message.go index 866cfd50..7708aa2f 100644 --- a/service/message.go +++ b/service/message.go @@ -73,6 +73,8 @@ func GetTextMessagesById(id string) (records []vo.TextMessageItem, err error) { Where("tm.`from_user` = ?", id). Where(`(tm.type = 1 OR ( tm.type = 49 AND EXTRACTVALUE ( tm.content, "/msg/appmsg/type" ) IN (?) ))`, appMsgList). Where("DATE ( tm.create_at ) = DATE ( CURDATE() - INTERVAL 1 DAY )"). + Where("tm.content NOT LIKE '#昨日水群排行榜%'"). + Where("tm.content NOT LIKE '#昨日消息总结%'"). Order("tm.create_at ASC") err = tx.Find(&records).Error diff --git a/tasks/summary/summary.go b/tasks/summary/summary.go index 359cca2d..94c3aa1a 100644 --- a/tasks/summary/summary.go +++ b/tasks/summary/summary.go @@ -42,11 +42,12 @@ func AiSummary() { 注意,他们可能是多个话题,请仔细甄别。 每一行代表一个人的发言,每一行的的格式为: {"{nickname}": "{content}"}--end-- +群名称: %s 聊天记录如下: %s ` - msg := fmt.Sprintf(msgTmp, strings.Join(content, "\n")) + msg := fmt.Sprintf(msgTmp, group.Nickname, strings.Join(content, "\n")) // AI总结 messages := []openai.ChatCompletionMessage{