RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Fix preview issue in file manager. (#3846)
Kevin Hu3f3469130bb1
diff --git a/api/apps/file_app.py b/api/apps/file_app.pyindex 630a122955..6542c54e97 100644--- a/api/apps/file_app.py+++ b/api/apps/file_app.py@@ -329,8 +329,13 @@ def get(file_id):e, file = FileService.get_by_id(file_id)if not e:return get_data_error_result(message="Document not found!")- b, n = File2DocumentService.get_storage_address(file_id=file_id)- response = flask.make_response(STORAGE_IMPL.get(b, n))++ blob = STORAGE_IMPL.get(file.parent_id, file.location)+ if not blob:+ b, n = File2DocumentService.get_storage_address(file_id=file_id)+ blob = STORAGE_IMPL.get(b, n)++ response = flask.make_response(blob)ext = re.search(r"\.([^.]+)$", file.name)if ext:if file.type == FileType.VISUAL.value:diff --git a/rag/llm/rerank_model.py b/rag/llm/rerank_model.pyindex 61752aec0c..2aa4392696 100644--- a/rag/llm/rerank_model.py+++ b/rag/llm/rerank_model.py@@ -126,7 +126,6 @@ class YoudaoRerank(DefaultRerank):with YoudaoRerank._model_lock:if not YoudaoRerank._model:try:- logging.info("LOADING BCE...")YoudaoRerank._model = RerankerModel(model_name_or_path=os.path.join(get_home_cache_dir(),re.sub(r"^[a-zA-Z0-9]+/", "", model_name)))