feat(aichat): add iter to agent

This commit is contained in:
源文雨
2026-01-06 22:28:11 +08:00
parent 1584ab8b11
commit ae165349b9
3 changed files with 7 additions and 7 deletions

View File

@@ -111,7 +111,7 @@ func init() {
logrus.Debugln("[aichat] agent set no timeout")
hasresp := false
for i := 0; i < 8; i++ { // 最大运行 8 轮因为问答上下文只有 16
reqs := chat.CallAgent(ag, zero.SuperUserPermission(ctx), x, mod, gid, role)
reqs := chat.CallAgent(ag, zero.SuperUserPermission(ctx), i+1, x, mod, gid, role)
if len(reqs) == 0 {
logrus.Debugln("[aichat] agent call got empty response")
break