Переглянути джерело

assign dataset indexing_technique to args if not explicitly provided (#20597)

tags/1.4.2
Abdullah AlOsaimi 5 місяці тому
джерело
коміт
ad8e79c440
Аккаунт користувача з таким Email не знайдено
1 змінених файлів з 4 додано та 1 видалено
  1. 4
    1
      api/controllers/service_api/dataset/document.py

+ 4
- 1
api/controllers/service_api/dataset/document.py Переглянути файл

@@ -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"]

Завантаження…
Відмінити
Зберегти