From 25d823769fc89af103d5e2d14b1d38b4ea369439 Mon Sep 17 00:00:00 2001 From: goder-zhang Date: Fri, 13 Feb 2026 12:33:09 +0000 Subject: [PATCH] fix: add enable max ai answer switch default disable max ai answer --- ws/ws.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ws/ws.go b/ws/ws.go index 6974c29..3e5fa3a 100644 --- a/ws/ws.go +++ b/ws/ws.go @@ -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 }