fix: correct indentation in dataset retrieval model assignment

Fix a bug that caused errors when uploading knowledge through the API by correcting the indentation level of the retrieval model assignment in dataset_service.py. The incorrect indentation was causing the retrieval model to be assigned outside the proper scope, leading to API errors during knowledge upload.
pull/20040/head
GonzaHM 1 year ago
parent 627911d4ff
commit 8bf6e0172f

@ -960,11 +960,11 @@ class DocumentService:
"score_threshold_enabled": False, "score_threshold_enabled": False,
} }
dataset.retrieval_model = ( dataset.retrieval_model = (
knowledge_config.retrieval_model.model_dump() knowledge_config.retrieval_model.model_dump()
if knowledge_config.retrieval_model if knowledge_config.retrieval_model
else default_retrieval_model else default_retrieval_model
) # type: ignore ) # type: ignore
documents = [] documents = []
if knowledge_config.original_document_id: if knowledge_config.original_document_id:

Loading…
Cancel
Save