perf: 修复 wecom 配置项的空格问题,确保正确传递 #599
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user