diff --git a/astrbot/core/platform/sources/wecom_ai_bot/wecomai_adapter.py b/astrbot/core/platform/sources/wecom_ai_bot/wecomai_adapter.py index 62f236b57..79fe6f8ed 100644 --- a/astrbot/core/platform/sources/wecom_ai_bot/wecomai_adapter.py +++ b/astrbot/core/platform/sources/wecom_ai_bot/wecomai_adapter.py @@ -440,9 +440,16 @@ class WecomAIBotAdapter(Platform): ) def _extract_session_id(self, message_data: dict[str, Any]) -> str: - """从消息数据中提取会话ID""" - user_id = message_data.get("from", {}).get("userid", "default_user") - return format_session_id("wecomai", user_id) + """从消息数据中提取会话ID + 群聊使用 chatid,单聊使用 userid + """ + chattype = message_data.get("chattype", "single") + if chattype == "group": + chat_id = message_data.get("chatid", "default_group") + return format_session_id("wecomai", chat_id) + else: + user_id = message_data.get("from", {}).get("userid", "default_user") + return format_session_id("wecomai", user_id) async def _enqueue_message( self, diff --git a/astrbot/core/provider/manager.py b/astrbot/core/provider/manager.py index 520b36cd4..0df9f791a 100644 --- a/astrbot/core/provider/manager.py +++ b/astrbot/core/provider/manager.py @@ -808,6 +808,8 @@ class ProviderManager: config.save_config() # load instance await self.load_provider(new_config) + # sync in-memory config for API queries (e.g., embedding provider list) + self.providers_config = astrbot_config["provider"] async def terminate(self) -> None: if self._mcp_init_task and not self._mcp_init_task.done(): diff --git a/docs/zh/deploy/astrbot/rainyun.md b/docs/zh/deploy/astrbot/rainyun.md index b0628b4d0..818785ec1 100644 --- a/docs/zh/deploy/astrbot/rainyun.md +++ b/docs/zh/deploy/astrbot/rainyun.md @@ -41,4 +41,4 @@ AstrBot 已经上架至雨云的预装软件列表,支持**一键安装** Astr ![创建NAT端口映射规则](https://files.astrbot.app/docs/source/images/rainyun/image-2.png) -然后,内网端口填写 `6185`,点击 `创建映射规则`,这样就可以通过 `http://IP:上面设置好的外网端口` 访问 AstrBot 的管理面板了。 +然后,内网端口填写 `6185`,点击 `创建映射规则`,这样就可以通过 `http://IP:上面设置好的外网端口` 访问 AstrBot 的管理面板了。如果无法打开,请点击`备用地址`,通过备用地址访问管理面板。