Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions astrbot/builtin_stars/astrbot/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ async def on_message(self, event: AstrMessageEvent):
if self.ltm_enabled(event) and self.ltm and has_image_or_plain:
need_active = await self.ltm.need_active_reply(event)

group_icl_enable = self.context.get_config()["provider_ltm_settings"][
"group_icl_enable"
]
group_icl_enable = self.context.get_config(
umo=event.unified_msg_origin
)["provider_ltm_settings"]["group_icl_enable"]
Comment on lines +39 to +41
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The configuration for the current UMO is fetched multiple times in this method (via ltm_enabled, need_active_reply, and again here). While this PR correctly fixes the UMO binding, consider fetching the configuration once at the beginning of on_message and reusing it to avoid redundant lookups and improve efficiency.

if group_icl_enable:
"""记录对话"""
try:
Expand Down