Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: DocumentAddByFileApi miss data_source_type field but there is a mandatory value check (#12273)
Sean Sunf71af7c2a887
diff --git a/api/controllers/service_api/dataset/document.py b/api/controllers/service_api/dataset/document.pyindex ea664b8f1be..2e148dd84c0 100644--- a/api/controllers/service_api/dataset/document.py+++ b/api/controllers/service_api/dataset/document.py@@ -190,7 +190,10 @@ class DocumentAddByFileApi(DatasetApiResource):user=current_user,source="datasets",)- data_source = {"type": "upload_file", "info_list": {"file_info_list": {"file_ids": [upload_file.id]}}}+ data_source = {+ "type": "upload_file",+ "info_list": {"data_source_type": "upload_file", "file_info_list": {"file_ids": [upload_file.id]}},+ }args["data_source"] = data_source# validate argsknowledge_config = KnowledgeConfig(**args)@@ -254,7 +257,10 @@ class DocumentUpdateByFileApi(DatasetApiResource):raise FileTooLargeError(file_too_large_error.description)except services.errors.file.UnsupportedFileTypeError:raise UnsupportedFileTypeError()- data_source = {"type": "upload_file", "info_list": {"file_info_list": {"file_ids": [upload_file.id]}}}+ data_source = {+ "type": "upload_file",+ "info_list": {"data_source_type": "upload_file", "file_info_list": {"file_ids": [upload_file.id]}},+ }args["data_source"] = data_source# validate argsargs["original_document_id"] = str(document_id)