This is an automated email from the ASF dual-hosted git repository.

linkinstar pushed a commit to branch feat/1.8.0/new-cp-fe
in repository https://gitbox.apache.org/repos/asf/answer.git

commit 9fbf9e4ff44aca7d6aa3ca112215d54652f7ef2b
Author: LinkinStars <[email protected]>
AuthorDate: Fri Jan 23 17:22:13 2026 +0800

    fix: correct loop iteration in AI conversation rounds
---
 internal/controller/ai_controller.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/internal/controller/ai_controller.go 
b/internal/controller/ai_controller.go
index aa7d2819..85db78a9 100644
--- a/internal/controller/ai_controller.go
+++ b/internal/controller/ai_controller.go
@@ -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{

Reply via email to