feat: add resource upload support for RAG (#768)

* feat: add resource upload support for RAG

- Backend: Added ingest_file method to Retriever and MilvusRetriever
- Backend: Added /api/rag/upload endpoint
- Frontend: Added RAGTab in settings for uploading resources
- Frontend: Updated translations and settings registration

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review of src/rag/milvus.py

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Willem Jiang
2025-12-19 09:55:34 +08:00
committed by GitHub
parent 3e8f2ce3ad
commit 04296cdf5a
9 changed files with 567 additions and 2 deletions

View File

@@ -32,6 +32,17 @@
"addNewMCPServers": "Add New MCP Servers",
"mcpConfigDescription": "DeerFlow uses the standard JSON MCP config to create a new server.",
"pasteConfigBelow": "Paste your config below and click \"Add\" to add new servers.",
"rag": {
"title": "Resources",
"description": "Manage your knowledge base resources here. Upload markdown or text files to be indexed for retrieval.",
"upload": "Upload",
"uploading": "Uploading...",
"uploadSuccess": "File uploaded successfully",
"uploadFailed": "Failed to upload file",
"emptyFile": "Cannot upload an empty file",
"loading": "Loading resources...",
"noResources": "No resources found. Upload a file to get started."
},
"add": "Add",
"general": {
"title": "General",