refactor llm

This commit is contained in:
bridge
2025-12-20 22:13:26 +08:00
parent e8489fcc25
commit 162ea8efe2
12 changed files with 122 additions and 422 deletions

View File

@@ -207,9 +207,8 @@ class Simulator:
# 使用 gather 并行触发奇遇
tasks = [try_trigger_fortune(avatar) for avatar in living_avatars]
results = await asyncio.gather(*tasks)
for res in results:
if res:
events.extend(res)
events.extend([e for res in results if res for e in res])
return events