fix: resolve dify init and douyu session errors
This commit is contained in:
@@ -98,6 +98,8 @@ class DifyPlugin(MessagePluginInterface):
|
||||
self._commands = dify_config.get("commands", ["ai", "dify", "聊天", "AI"])
|
||||
self.command_format = dify_config.get("command-tip", "聊天 请求内容")
|
||||
self.enable = dify_config.get("enable", True)
|
||||
raw_api_key = dify_config.get("api-key", "")
|
||||
raw_base_url = dify_config.get("base-url", "")
|
||||
self.price = dify_config.get("price", 0)
|
||||
self.admin_ignore = dify_config.get("admin_ignore", False)
|
||||
self.whitelist_ignore = dify_config.get("whitelist_ignore", False)
|
||||
@@ -108,8 +110,8 @@ class DifyPlugin(MessagePluginInterface):
|
||||
"backend": dify_config.get("backend", ""),
|
||||
"provider": "dify",
|
||||
"mode": "workflow",
|
||||
"api-key": self.api_key,
|
||||
"base-url": self.base_url,
|
||||
"api-key": raw_api_key,
|
||||
"base-url": raw_base_url,
|
||||
"endpoint": "workflows/run",
|
||||
"response_mode": "blocking",
|
||||
"request_timeout": 40,
|
||||
|
||||
@@ -666,11 +666,11 @@ class DouyuPlugin(MessagePluginInterface):
|
||||
continue
|
||||
if prev_live is True and curr_live is True and room_id not in self._danmu_recorders:
|
||||
try:
|
||||
session = self._open_or_resume_session(room_id, nickname, room_name)
|
||||
if session:
|
||||
room_session = self._open_or_resume_session(room_id, nickname, room_name)
|
||||
if room_session:
|
||||
logger.info(
|
||||
f"检测到持续直播状态,续接斗鱼直播会话({room_id}): "
|
||||
f"session={session.get('session_id')}"
|
||||
f"session={room_session.get('session_id')}"
|
||||
)
|
||||
logger.info(f"检测到持续直播状态,补偿启动斗鱼弹幕记录({room_id})")
|
||||
self._start_danmu_record(room_id)
|
||||
|
||||
Reference in New Issue
Block a user