Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: when rerank error stop chat (#20178)

Wang Qi4fc572875606
diff --git a/internal/service/chat_pipeline.go b/internal/service/chat_pipeline.go
index 33a3eeb906..2a3cb9a8b0 100644
--- a/internal/service/chat_pipeline.go
+++ b/internal/service/chat_pipeline.go
@@ -932,7 +932,11 @@ func (s *ChatPipelineService) AsyncChat(
}
if err != nil {
common.Warn("Retrieval failed", zap.Error(err))
- // Continue with empty kbinfos.
+ out <- AsyncChatResult{
+ Answer: fmt.Sprintf("**ERROR**: %s", err.Error()),
+ Final: true,
+ }
+ return
}
}