-
Notifications
You must be signed in to change notification settings - Fork 186
Closed
Labels
✈️ integrationIntegration other frameworksIntegration other frameworks🐛 bugSomething isn't workingSomething isn't working
Description
确认项
问题描述
- 使用 Bark 进行通知时,通知内容始终显示为“push”而非自定义的body内容。
- 此外,官网文档中的 Bark 自由提醒部分疑似复制自钉钉,未进行修改(格式及函数名都有问题);
必须的复现代码
核心代码:
bark_callback = BarkCallback(key, url)
data = {'title': title, 'body': body_str}
# bark_callback.send_msg(content=data) # 官网文档所写
# 查看 swanlab/plugin/notification.py 代码发现 Bark 部分使用的是 send_notification 而非 send_msg
bark_callback.send_notification(data) 复现步骤:
代码如上,根据官方文档的方式进行 Bark 自定义通知推送时(已使用send_notification()),通知的内容始终显示为“push”,包括实验结束自动发送的通知内容也是“push”,通知标题没有问题。
错误信息
错误位于swanlab/plugin/notification.py 的第544-547行:
if self.url.endswith('/'):
url = self.url + 'push'
else:
url = self.url + '/push'此处删除“push”即能正常显示自定义通知内容。
- 此外,官方文档的相应位置直接复制了钉钉部分忘了改,包括使用了错误的函数
send_msg(),还请记得修正
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
✈️ integrationIntegration other frameworksIntegration other frameworks🐛 bugSomething isn't workingSomething isn't working