优化了群总结prompt,减少了总结相关内容的有效性。

This commit is contained in:
liuwei
2025-02-20 15:46:13 +08:00
parent ac89540599
commit f791b9c5d6
2 changed files with 11 additions and 9 deletions

View File

@@ -2,6 +2,8 @@ import pymysql
from datetime import datetime, timedelta
import redis
from message_summary.message_summary_4o import message_summary
# 配置数据库连接
db_config = {
'host': '192.168.2.32', # 替换为你的MariaDB服务器地址
@@ -97,11 +99,12 @@ def get_messages(group_id, all_contacts: dict):
# 示例用法
if __name__ == "__main__":
group_id = 'XXX@123123'
timestamp_str = "2025-02-06 11:15:28"
sender = "XXX"
content = "This is a test message with a string timestamp."
message_type = "text"
attachment_url = "http://example.com/attachment.pdf" # 可以为None如果没有附件
archive_message(group_id, timestamp_str, sender, content, message_type, attachment_url)
# group_id = 'XXX@123123'
# timestamp_str = "2025-02-06 11:15:28"
# sender = "XXX"
# content = "This is a test message with a string timestamp."
# message_type = "text"
# attachment_url = "http://example.com/attachment.pdf" # 可以为None如果没有附件
#
# archive_message(group_id, timestamp_str, sender, content, message_type, attachment_url)
message_summary(get_messages("45317011307@chatroom", {}))

View File

@@ -1,7 +1,6 @@
import requests
import json
# 解析JSON
def extract_content(data_string):
try: