fix: add enable max ai answer switch default disable max ai answer

This commit is contained in:
goder-zhang 2026-02-13 12:33:09 +00:00
parent 9a48b97767
commit 25d823769f

View File

@ -17,6 +17,8 @@ import (
const (
MaxAIAnswerCycleTimes int = 3
EnableMaxAIAnswer = false
)
type User struct {
@ -152,5 +154,10 @@ func UpdateVisitorUser(visitorId string, toId string) {
}
func AIAnswerAvailable(u *User) bool {
if !EnableMaxAIAnswer {
// 未开启最大AI回复轮次则永远不进入人工
return true
}
return u.AIAnswerCycle < MaxAIAnswerCycleTimes
}