From a1a3fa02836175f51610a74c5e5d2061301c2be7 Mon Sep 17 00:00:00 2001 From: FFXN Date: Mon, 15 Dec 2025 16:44:32 +0800 Subject: [PATCH] Add "type" field to PipelineRecommendedPlugin model; Add query param "type" to recommended-plugins api. --- .../console/datasets/rag_pipeline/rag_pipeline_workflow.py | 4 ++-- api/services/rag_pipeline/rag_pipeline.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/controllers/console/datasets/rag_pipeline/rag_pipeline_workflow.py b/api/controllers/console/datasets/rag_pipeline/rag_pipeline_workflow.py index 6b86846e3e..602c24d3b8 100644 --- a/api/controllers/console/datasets/rag_pipeline/rag_pipeline_workflow.py +++ b/api/controllers/console/datasets/rag_pipeline/rag_pipeline_workflow.py @@ -1007,8 +1007,8 @@ class RagPipelineRecommendedPluginApi(Resource): parser = reqparse.RequestParser() parser.add_argument('type', type=str, location='args', required=False, default='all') args = parser.parse_args() - plugin_type = args["type"] + type = args["type"] rag_pipeline_service = RagPipelineService() - recommended_plugins = rag_pipeline_service.get_recommended_plugins(plugin_type) + recommended_plugins = rag_pipeline_service.get_recommended_plugins(type) return recommended_plugins diff --git a/api/services/rag_pipeline/rag_pipeline.py b/api/services/rag_pipeline/rag_pipeline.py index e438eae295..3065651c9d 100644 --- a/api/services/rag_pipeline/rag_pipeline.py +++ b/api/services/rag_pipeline/rag_pipeline.py @@ -1248,7 +1248,7 @@ class RagPipelineService: session.commit() return workflow_node_execution_db_model - def get_recommended_plugins(self, type) -> dict: + def get_recommended_plugins(self, type: str) -> dict: # Query active recommended plugins query = db.session.query(PipelineRecommendedPlugin).where(PipelineRecommendedPlugin.active == True) if type and type != "all":