fix: correct loop iteration in AI conversation rounds

This commit is contained in:
LinkinStars
2026-01-23 17:22:13 +08:00
parent c1549d2909
commit 9fbf9e4ff4
+1 -1
View File
@@ -433,7 +433,7 @@ func (c *AIController) handleAIConversation(ctx *gin.Context, w http.ResponseWri
maxRounds := 10
messages := conversationCtx.GetOpenAIMessages()
for round := 0; round < maxRounds; round++ {
for round := range maxRounds {
log.Debugf("AI conversation round: %d", round+1)
aiReq := openai.ChatCompletionRequest{