fix(aichat): cannot save config

This commit is contained in:
源文雨
2025-12-23 17:25:13 +08:00
parent 6a5ffa0b16
commit a5a1edda2d
4 changed files with 23 additions and 18 deletions

View File

@@ -182,17 +182,18 @@ func init() {
logrus.Infoln("[aichat] 回复内容:", t)
recCfg := airecord.GetConfig()
record := ""
if !stor.norecord() {
if !fastfailnorecord && !stor.norecord() {
record = ctx.GetAIRecord(recCfg.ModelID, recCfg.Customgid, t)
}
if record != "" {
ctx.SendChain(message.Record(record))
} else {
if id != nil {
id = ctx.SendChain(message.Reply(id), message.Text(t))
} else {
id = ctx.SendChain(message.Text(t))
if record != "" {
ctx.SendChain(message.Record(record))
continue
}
fastfailnorecord = true
}
if id != nil {
id = ctx.SendChain(message.Reply(id), message.Text(t))
} else {
id = ctx.SendChain(message.Text(t))
}
process.SleepAbout1sTo2s()
}