chore: print error detail when call http api failed with mj

This commit is contained in:
RockYang
2024-01-21 22:30:24 +08:00
parent 9960a31485
commit 16f946550e
2 changed files with 7 additions and 2 deletions

View File

@@ -35,7 +35,9 @@ func NewServicePool(db *gorm.DB, redisCli *redis.Client, manager *oss.UploaderMa
if config.Enabled == false {
continue
}
config.ApiURL = "https://api.chat-plus.net"
if config.ApiURL != "https://gpt.bemore.lol" && config.ApiURL != "https://api.chat-plus.net" {
config.ApiURL = "https://api.chat-plus.net"
}
client := plus.NewClient(config)
name := fmt.Sprintf("mj-service-plus-%d", k)
servicePlus := plus.NewService(name, taskQueue, notifyQueue, 10, 600, db, client)