🤖 自动格式化代码 [skip ci]
This commit is contained in:
@@ -184,9 +184,7 @@ class ChattingObservation(Observation):
|
||||
try:
|
||||
# 只需检查是否存在,不需要获取内容,使用 {"_id": 1} 提高效率
|
||||
new_message = await asyncio.to_thread(
|
||||
db.messages.find_one,
|
||||
{"chat_id": self.chat_id, "time": {"$gt": timestamp}},
|
||||
{"_id": 1}
|
||||
db.messages.find_one, {"chat_id": self.chat_id, "time": {"$gt": timestamp}}, {"_id": 1}
|
||||
)
|
||||
# new_message = db.messages.find_one({"chat_id": self.chat_id, "time": {"$gt": timestamp}}, {"_id": 1}) # find_one 不是异步的
|
||||
return new_message is not None
|
||||
|
||||
@@ -43,13 +43,9 @@ def init_prompt():
|
||||
prompt += "你现在{mood_info}\n"
|
||||
# prompt += "你注意到{sender_name}刚刚说:{message_txt}\n"
|
||||
prompt += "现在请你根据刚刚的想法继续思考,思考时可以想想如何对群聊内容进行回复,要不要对群里的话题进行回复,关注新话题,可以适当转换话题,大家正在说的话才是聊天的主题。\n"
|
||||
prompt += (
|
||||
"回复的要求是:平淡一些,简短一些,说中文,如果你要回复,最好只回复一个人的一个话题\n"
|
||||
)
|
||||
prompt += "回复的要求是:平淡一些,简短一些,说中文,如果你要回复,最好只回复一个人的一个话题\n"
|
||||
prompt += "请注意不要输出多余内容(包括前后缀,冒号和引号,括号, 表情,等),不要带有括号和动作描写。不要回复自己的发言,尽量不要说你说过的话。"
|
||||
prompt += (
|
||||
"现在请你继续生成你在这个聊天中的想法,不要分点输出,生成内心想法,文字不要浮夸"
|
||||
)
|
||||
prompt += "现在请你继续生成你在这个聊天中的想法,不要分点输出,生成内心想法,文字不要浮夸"
|
||||
|
||||
Prompt(prompt, "sub_heartflow_prompt_before")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user