mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 12:37:20 +08:00
r2
This commit is contained in:
parent
e095de05c5
commit
4b9a5a66c1
@ -90,6 +90,7 @@ from .datasets.rag_pipeline import (
|
|||||||
datasource_content_preview,
|
datasource_content_preview,
|
||||||
rag_pipeline,
|
rag_pipeline,
|
||||||
rag_pipeline_datasets,
|
rag_pipeline_datasets,
|
||||||
|
rag_pipeline_draft_variable,
|
||||||
rag_pipeline_import,
|
rag_pipeline_import,
|
||||||
rag_pipeline_workflow,
|
rag_pipeline_workflow,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -53,6 +53,7 @@ class RagPipelineImportApi(Resource):
|
|||||||
yaml_content=args.get("yaml_content"),
|
yaml_content=args.get("yaml_content"),
|
||||||
yaml_url=args.get("yaml_url"),
|
yaml_url=args.get("yaml_url"),
|
||||||
pipeline_id=args.get("pipeline_id"),
|
pipeline_id=args.get("pipeline_id"),
|
||||||
|
dataset_name=args.get("name"),
|
||||||
)
|
)
|
||||||
session.commit()
|
session.commit()
|
||||||
|
|
||||||
|
|||||||
@ -123,6 +123,7 @@ class RagPipelineDslService:
|
|||||||
yaml_url: Optional[str] = None,
|
yaml_url: Optional[str] = None,
|
||||||
pipeline_id: Optional[str] = None,
|
pipeline_id: Optional[str] = None,
|
||||||
dataset: Optional[Dataset] = None,
|
dataset: Optional[Dataset] = None,
|
||||||
|
dataset_name: Optional[str] = None,
|
||||||
) -> RagPipelineImportInfo:
|
) -> RagPipelineImportInfo:
|
||||||
"""Import an app from YAML content or URL."""
|
"""Import an app from YAML content or URL."""
|
||||||
import_id = str(uuid.uuid4())
|
import_id = str(uuid.uuid4())
|
||||||
@ -265,7 +266,7 @@ class RagPipelineDslService:
|
|||||||
dependencies=check_dependencies_pending_data,
|
dependencies=check_dependencies_pending_data,
|
||||||
)
|
)
|
||||||
# create dataset
|
# create dataset
|
||||||
name = pipeline.name
|
name = dataset_name or pipeline.name
|
||||||
description = pipeline.description
|
description = pipeline.description
|
||||||
icon_type = data.get("rag_pipeline", {}).get("icon_type")
|
icon_type = data.get("rag_pipeline", {}).get("icon_type")
|
||||||
icon = data.get("rag_pipeline", {}).get("icon")
|
icon = data.get("rag_pipeline", {}).get("icon")
|
||||||
@ -883,6 +884,7 @@ class RagPipelineDslService:
|
|||||||
import_mode=ImportMode.YAML_CONTENT.value,
|
import_mode=ImportMode.YAML_CONTENT.value,
|
||||||
yaml_content=rag_pipeline_dataset_create_entity.yaml_content,
|
yaml_content=rag_pipeline_dataset_create_entity.yaml_content,
|
||||||
dataset=None,
|
dataset=None,
|
||||||
|
dataset_name=rag_pipeline_dataset_create_entity.name,
|
||||||
)
|
)
|
||||||
return {
|
return {
|
||||||
"id": rag_pipeline_import_info.id,
|
"id": rag_pipeline_import_info.id,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user