mirror of
https://github.com/langgenius/dify.git
synced 2025-11-02 11:52:58 +00:00
assign dataset indexing_technique to args if not explicitly provided (#20597)
This commit is contained in:
parent
f2dcfc976d
commit
ad8e79c440
@ -175,8 +175,11 @@ class DocumentAddByFileApi(DatasetApiResource):
|
||||
|
||||
if not dataset:
|
||||
raise ValueError("Dataset does not exist.")
|
||||
if not dataset.indexing_technique and not args.get("indexing_technique"):
|
||||
|
||||
indexing_technique = args.get("indexing_technique") or dataset.indexing_technique
|
||||
if not indexing_technique:
|
||||
raise ValueError("indexing_technique is required.")
|
||||
args["indexing_technique"] = indexing_technique
|
||||
|
||||
# save file info
|
||||
file = request.files["file"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user