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 code injection (#1868)
Tong Liuf43db8bc5161
diff --git a/api/apps/llm_app.py b/api/apps/llm_app.pyindex 3f5a0b7be4..c29a220cb9 100644--- a/api/apps/llm_app.py+++ b/api/apps/llm_app.py@@ -22,6 +22,7 @@ from api.db.db_models import TenantLLMfrom api.utils.api_utils import get_json_resultfrom rag.llm import EmbeddingModel, ChatModel, RerankModel,CvModelimport requests+import ast@manager.route('/factories', methods=['GET'])@login_required@@ -113,7 +114,7 @@ def add_llm():if factory == "VolcEngine":# For VolcEngine, due to its special authentication method# Assemble volc_ak, volc_sk, endpoint_id into api_key- temp = list(eval(req["llm_name"]).items())[0]+ temp = list(ast.literal_eval(req["llm_name"]).items())[0]llm_name = temp[0]endpoint_id = temp[1]api_key = '{' + f'"volc_ak": "{req.get("volc_ak", "")}", ' \