🤖 自动格式化代码 [skip ci]

This commit is contained in:
github-actions[bot]
2025-04-12 16:46:11 +00:00
parent e1f272d9c5
commit 46da415d98
43 changed files with 498 additions and 532 deletions

View File

@@ -16,7 +16,7 @@ class Waiter:
self.chat_observer = ChatObserver.get_instance(stream_id)
self.personality_info = Individuality.get_instance().get_prompt(type="personality", x_person=2, level=2)
self.name = global_config.BOT_NICKNAME
self.wait_accumulated_time = 0
async def wait(self, conversation_info: ConversationInfo) -> bool:
@@ -38,20 +38,20 @@ class Waiter:
# 检查是否超时
if time.time() - wait_start_time > 300:
self.wait_accumulated_time += 300
logger.info("等待超过300秒结束对话")
wait_goal = {
"goal": f"你等待了{self.wait_accumulated_time/60}分钟,思考接下来要做什么",
"reason": "对方很久没有回复你的消息了"
"goal": f"你等待了{self.wait_accumulated_time / 60}分钟,思考接下来要做什么",
"reason": "对方很久没有回复你的消息了",
}
conversation_info.goal_list.append(wait_goal)
print(f"添加目标: {wait_goal}")
return True
await asyncio.sleep(1)
logger.info("等待中...")
async def wait_listening(self, conversation_info: ConversationInfo) -> bool:
"""等待倾听
@@ -73,14 +73,13 @@ class Waiter:
self.wait_accumulated_time += 300
logger.info("等待超过300秒结束对话")
wait_goal = {
"goal": f"你等待了{self.wait_accumulated_time/60}分钟,思考接下来要做什么",
"reason": "对方话说一半消失了,很久没有回复"
"goal": f"你等待了{self.wait_accumulated_time / 60}分钟,思考接下来要做什么",
"reason": "对方话说一半消失了,很久没有回复",
}
conversation_info.goal_list.append(wait_goal)
print(f"添加目标: {wait_goal}")
return True
await asyncio.sleep(1)
logger.info("等待中...")