diff --git a/astrbot/core/platform/sources/wecom/wecom_adapter.py b/astrbot/core/platform/sources/wecom/wecom_adapter.py index 7cf62c812..0127342fe 100644 --- a/astrbot/core/platform/sources/wecom/wecom_adapter.py +++ b/astrbot/core/platform/sources/wecom/wecom_adapter.py @@ -36,9 +36,9 @@ class WecomServer(): self.event_queue = event_queue self.crypto = WeChatCrypto( - config['token'], - config['encoding_aes_key'], - config['corpid'] + config['token'].strip(), + config['encoding_aes_key'].strip(), + config['corpid'].strip() ) self.callback = None @@ -136,8 +136,8 @@ class WecomPlatformAdapter(Platform): ) self.client = WeChatClient( - self.config['corpid'], - self.config['secret'], + self.config['corpid'].strip(), + self.config['secret'].strip(), ) self.client.API_BASE_URL = self.api_base_url diff --git a/astrbot/core/provider/sources/dify_source.py b/astrbot/core/provider/sources/dify_source.py index d0ffa9d0f..9e8e344f7 100644 --- a/astrbot/core/provider/sources/dify_source.py +++ b/astrbot/core/provider/sources/dify_source.py @@ -100,11 +100,11 @@ class ProviderDify(Provider): self.conversation_ids[session_id] = chunk['conversation_id'] conversation_id = chunk['conversation_id'] elif chunk['event'] == 'message_end': - logger.debug(f"Dify message end") + logger.debug("Dify message end") break elif chunk['event'] == 'error': - logger.error(f"Dify 出现错误:{chunk['error']}") - raise Exception(f"Dify 出现错误 status: {chunk['status']} message: {chunk['message']} error_code: {chunk['error']}") + logger.error(f"Dify 出现错误:{chunk}") + raise Exception(f"Dify 出现错误 status: {chunk['status']} message: {chunk['message']}") case "workflow": async for chunk in self.api_client.workflow_run(