Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat: retrieve external_documents add doc_metadata (#22496)

cyss937fdb49a8a1
diff --git a/api/core/rag/retrieval/dataset_retrieval.py b/api/core/rag/retrieval/dataset_retrieval.py
index eee5b887691..015228c46c7 100644
--- a/api/core/rag/retrieval/dataset_retrieval.py
+++ b/api/core/rag/retrieval/dataset_retrieval.py
@@ -537,6 +537,7 @@ class DatasetRetrieval:
retriever_from=invoke_from.to_source(),
score=item.metadata.get("score"),
content=item.page_content,
+ doc_metadata=item.metadata,
)
retrieval_resource_list.append(source)
# deal with dify documents