mirror of https://github.com/langgenius/dify.git
Add "type" field to PipelineRecommendedPlugin model; Add query param "type" to recommended-plugins api.
This commit is contained in:
parent
ff7344f3d3
commit
a1a3fa0283
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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":
|
||||
|
|
|
|||
Loading…
Reference in New Issue