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":