feat:优化表达方式学习,太久没学的会抛弃,提供检查脚本
This commit is contained in:
@@ -17,12 +17,12 @@ class ImpressionUpdateTask(AsyncTask):
|
||||
super().__init__(
|
||||
task_name="impression_update",
|
||||
wait_before_start=5, # 启动后等待10秒
|
||||
run_interval=10, # 每1分钟运行一次
|
||||
run_interval=20, # 每1分钟运行一次
|
||||
)
|
||||
|
||||
async def run(self):
|
||||
try:
|
||||
if random.random() < 0.5:
|
||||
if random.random() < 0.1:
|
||||
# 获取最近10分钟的消息
|
||||
current_time = int(time.time())
|
||||
start_time = current_time - 6000 # 10分钟前
|
||||
@@ -30,7 +30,7 @@ class ImpressionUpdateTask(AsyncTask):
|
||||
else:
|
||||
now = int(time.time())
|
||||
# 30天前的时间戳
|
||||
month_ago = now - 30 * 24 * 60 * 60
|
||||
month_ago = now - 90 * 24 * 60 * 60
|
||||
# 随机选择一个小时的起点
|
||||
random_start = random.randint(month_ago, now - 3600)
|
||||
start_time = random_start
|
||||
|
||||
@@ -228,7 +228,7 @@ class RelationshipManager:
|
||||
readable_messages = build_readable_messages(
|
||||
messages=user_messages,
|
||||
replace_bot_name=True,
|
||||
timestamp_mode="relative",
|
||||
timestamp_mode="normal",
|
||||
truncate=False)
|
||||
|
||||
|
||||
@@ -263,7 +263,8 @@ class RelationshipManager:
|
||||
|
||||
new_impression, _ = await self.relationship_llm.generate_response_async(prompt=prompt)
|
||||
|
||||
logger.debug(f"new_impression: {new_impression}")
|
||||
logger.info(f"prompt: {prompt}")
|
||||
logger.info(f"new_impression: {new_impression}")
|
||||
|
||||
prompt_json = f"""
|
||||
你的名字是{global_config.bot.nickname},别名是{alias_str}。
|
||||
@@ -274,8 +275,8 @@ class RelationshipManager:
|
||||
|
||||
请用json格式总结对{person_name}(昵称:{nickname})的印象,要求:
|
||||
1.总结出这个人的最核心的性格,可能在这段话里看不出,总结不出来的话,就输出空字符串
|
||||
2.尝试猜测这个人的性别,如果看不出来,就输出空字符串
|
||||
3.尝试猜测自己与这个人的关系,你与ta的交互,还可以思考是积极还是消极,以及具体内容
|
||||
2.尝试猜测这个人的性别
|
||||
3.尝试猜测自己与这个人的关系,你与ta的交互,思考是积极还是消极,以及具体内容
|
||||
4.尝试猜测这个人的身份,比如职业,兴趣爱好,生活状态等
|
||||
5.尝试总结你与他之间是否有一些独特的梗,如果有,就输出梗的内容,如果没有,就输出空字符串
|
||||
|
||||
|
||||
Reference in New Issue
Block a user