Skip to content

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

add interface to get doc infos by doc ids (#1950)

Kevin Hueedec157a7c7
diff --git a/api/apps/document_app.py b/api/apps/document_app.py
index baaf7fe306..721f8d1372 100644
--- a/api/apps/document_app.py
+++ b/api/apps/document_app.py
@@ -203,6 +203,14 @@ def list_docs():
return server_error_response(e)
[email protected]('/infos', methods=['POST'])
+def docinfos():
+ req = request.json
+ doc_ids = req["doc_ids"]
+ docs = DocumentService.get_by_ids(doc_ids)
+ return get_json_result(data=list(docs.dicts()))
+
+
@manager.route('/thumbnails', methods=['GET'])
@login_required
def thumbnails():