Skip to content

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

fix: replace mutable default arguments with None in LLM chat models (#13513)

Ethan T.ba8cb9dd4ace
diff --git a/api/db/services/document_service.py b/api/db/services/document_service.py
index 2c80e76fc6..44c9995c02 100644
--- a/api/db/services/document_service.py
+++ b/api/db/services/document_service.py
@@ -1007,11 +1007,13 @@ class DocumentService(CommonService):
queue_tasks(doc, bucket, name, 0)
-def queue_raptor_o_graphrag_tasks(sample_doc, ty, priority, fake_doc_id="", doc_ids=[]):
+def queue_raptor_o_graphrag_tasks(sample_doc, ty, priority, fake_doc_id="", doc_ids=None):
"""
You can provide a fake_doc_id to bypass the restriction of tasks at the knowledgebase level.
Optionally, specify a list of doc_ids to determine which documents participate in the task.
"""
+ if doc_ids is None:
+ doc_ids = []
assert ty in ["graphrag", "raptor", "mindmap"], "type should be graphrag, raptor or mindmap"
chunking_config = DocumentService.get_chunking_config(sample_doc["id"])