Compare commits

...

4 Commits

Author SHA1 Message Date
MyronZhang
fe90d10e12 Merge a78360efd8 into 8df4a2670b 2025-03-09 20:46:25 +08:00
JustSong
8df4a2670b docs: update ByteDance Doubao model link in README
Some checks failed
CI / Unit tests (push) Has been cancelled
CI / commit_lint (push) Has been cancelled
2025-02-21 19:30:16 +08:00
MyronZhang
a78360efd8 fix send ByAll 2025-02-11 18:32:59 +08:00
MyronZhang
8f6b13c2fe fix send ByAll 2025-02-11 16:17:53 +08:00
3 changed files with 18 additions and 2 deletions

View File

@@ -72,7 +72,7 @@ _✨ 通过标准的 OpenAI API 格式访问所有的大模型,开箱即用
+ [x] [Anthropic Claude 系列模型](https://anthropic.com) (支持 AWS Claude)
+ [x] [Google PaLM2/Gemini 系列模型](https://developers.generativeai.google)
+ [x] [Mistral 系列模型](https://mistral.ai/)
+ [x] [字节跳动豆包大模型](https://console.volcengine.com/ark/region:ark+cn-beijing/model)
+ [x] [字节跳动豆包大模型(火山引擎)](https://www.volcengine.com/experience/ark?utm_term=202502dsinvite&ac=DSASUQY5&rc=2QXCA1VI)
+ [x] [百度文心一言系列模型](https://cloud.baidu.com/doc/WENXINWORKSHOP/index.html)
+ [x] [阿里通义千问系列模型](https://help.aliyun.com/document_detail/2400395.html)
+ [x] [讯飞星火认知大模型](https://www.xfyun.cn/doc/spark/Web.html)

View File

@@ -12,6 +12,22 @@ const (
)
func Notify(by string, title string, description string, content string) error {
if by == ByAll {
var errMsgs []string
if err := SendEmail(title, config.RootUserEmail, content); err != nil {
errMsgs = append(errMsgs, fmt.Sprintf("failed to send email: %v", err))
}
if err := SendMessage(title, description, content); err != nil {
errMsgs = append(errMsgs, fmt.Sprintf("failed to send message: %v", err))
}
if len(errMsgs) > 0 {
return fmt.Errorf("multiple errors occurred: %v", errMsgs)
}
return nil
}
if by == ByEmail {
return SendEmail(title, config.RootUserEmail, content)
}

View File

@@ -266,7 +266,7 @@ func testChannels(ctx context.Context, notify bool, scope string) error {
if notify {
err := message.Notify(message.ByAll, "渠道测试完成", "", "渠道测试完成,如果没有收到禁用通知,说明所有渠道都正常")
if err != nil {
logger.SysError(fmt.Sprintf("failed to send email: %s", err.Error()))
logger.SysError(fmt.Sprintf("failed to send notify: %s", err.Error()))
}
}
}()