Skip to content

Commit 2685528

Browse files
Merge pull request #6397 from AstrBotDevs/master
sync master-﹥dev
2 parents 3f24f82 + 3fbd16b commit 2685528

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

astrbot/core/platform/sources/wecom_ai_bot/wecomai_adapter.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,16 @@ async def _send_long_connection_respond_msg(
440440
)
441441

442442
def _extract_session_id(self, message_data: dict[str, Any]) -> str:
443-
"""从消息数据中提取会话ID"""
444-
user_id = message_data.get("from", {}).get("userid", "default_user")
445-
return format_session_id("wecomai", user_id)
443+
"""从消息数据中提取会话ID
444+
群聊使用 chatid,单聊使用 userid
445+
"""
446+
chattype = message_data.get("chattype", "single")
447+
if chattype == "group":
448+
chat_id = message_data.get("chatid", "default_group")
449+
return format_session_id("wecomai", chat_id)
450+
else:
451+
user_id = message_data.get("from", {}).get("userid", "default_user")
452+
return format_session_id("wecomai", user_id)
446453

447454
async def _enqueue_message(
448455
self,

astrbot/core/provider/manager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,8 @@ async def create_provider(self, new_config: dict) -> None:
808808
config.save_config()
809809
# load instance
810810
await self.load_provider(new_config)
811+
# sync in-memory config for API queries (e.g., embedding provider list)
812+
self.providers_config = astrbot_config["provider"]
811813

812814
async def terminate(self) -> None:
813815
if self._mcp_init_task and not self._mcp_init_task.done():

docs/zh/deploy/astrbot/rainyun.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ AstrBot 已经上架至雨云的预装软件列表,支持**一键安装** Astr
4141

4242
![创建NAT端口映射规则](https://files.astrbot.app/docs/source/images/rainyun/image-2.png)
4343

44-
然后,内网端口填写 `6185`,点击 `创建映射规则`,这样就可以通过 `http://IP:上面设置好的外网端口` 访问 AstrBot 的管理面板了。
44+
然后,内网端口填写 `6185`,点击 `创建映射规则`,这样就可以通过 `http://IP:上面设置好的外网端口` 访问 AstrBot 的管理面板了。如果无法打开,请点击`备用地址`,通过备用地址访问管理面板。

0 commit comments

Comments
 (0)