forked from lxh/go-wxhelper
Merge pull request '🎨 消息总结新增传入群名称和过滤排行榜及前一天的总结消息' (#53) from hotfix into main
Reviewed-on: lxh/go-wxhelper#53
This commit is contained in:
commit
3554c95edc
@ -73,6 +73,8 @@ func GetTextMessagesById(id string) (records []vo.TextMessageItem, err error) {
|
|||||||
Where("tm.`from_user` = ?", id).
|
Where("tm.`from_user` = ?", id).
|
||||||
Where(`(tm.type = 1 OR ( tm.type = 49 AND EXTRACTVALUE ( tm.content, "/msg/appmsg/type" ) IN (?) ))`, appMsgList).
|
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("DATE ( tm.create_at ) = DATE ( CURDATE() - INTERVAL 1 DAY )").
|
||||||
|
Where("tm.content NOT LIKE '#昨日水群排行榜%'").
|
||||||
|
Where("tm.content NOT LIKE '#昨日消息总结%'").
|
||||||
Order("tm.create_at ASC")
|
Order("tm.create_at ASC")
|
||||||
|
|
||||||
err = tx.Find(&records).Error
|
err = tx.Find(&records).Error
|
||||||
|
@ -42,11 +42,12 @@ func AiSummary() {
|
|||||||
注意,他们可能是多个话题,请仔细甄别。
|
注意,他们可能是多个话题,请仔细甄别。
|
||||||
每一行代表一个人的发言,每一行的的格式为: {"{nickname}": "{content}"}--end--
|
每一行代表一个人的发言,每一行的的格式为: {"{nickname}": "{content}"}--end--
|
||||||
|
|
||||||
|
群名称: %s
|
||||||
聊天记录如下:
|
聊天记录如下:
|
||||||
%s
|
%s
|
||||||
`
|
`
|
||||||
|
|
||||||
msg := fmt.Sprintf(msgTmp, strings.Join(content, "\n"))
|
msg := fmt.Sprintf(msgTmp, group.Nickname, strings.Join(content, "\n"))
|
||||||
|
|
||||||
// AI总结
|
// AI总结
|
||||||
messages := []openai.ChatCompletionMessage{
|
messages := []openai.ChatCompletionMessage{
|
||||||
|
Loading…
Reference in New Issue
Block a user