Skip to content

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

fix: get duplicate datasetID when get-Chat (#16498)

Haruko386d6b1c5937bb9
diff --git a/internal/service/chat.go b/internal/service/chat.go
index 6106b4b73d..ff6c4568e1 100644
--- a/internal/service/chat.go
+++ b/internal/service/chat.go
@@ -1186,15 +1186,6 @@ func (s *ChatService) GetChat(userID string, chatID string) (*GetChatResponse, e
// Resolve kb_ids to kb_names
kbNames, datasetIDs := s.getDatasetNamesAndIDs(chat.KBIDs)
- // Build dataset_ids from kb_ids (same as Python _resolve_kb_names returns ids)
- for _, kbID := range chat.KBIDs {
- datasetID, ok := kbID.(string)
- if !ok {
- continue
- }
- datasetIDs = append(datasetIDs, datasetID)
- }
-
return &GetChatResponse{
Chat: chat,
DatasetIDs: datasetIDs,