Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywoola committed Sep 10, 2024
1 parent 3764e28 commit 190daa2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions api/controllers/console/datasets/datasets_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,8 @@ def post(self):
"doc_language", type=str, default="English", required=False, nullable=False, location="json"
)
parser.add_argument("retrieval_model", type=dict, required=False, nullable=False, location="json")
parser.add_argument("embedding_model", type=str, required=False, nullable=True,
location="json")
parser.add_argument("embedding_model_provider", type=str, required=False, nullable=True,
location="json")
parser.add_argument("embedding_model", type=str, required=False, nullable=True, location="json")
parser.add_argument("embedding_model_provider", type=str, required=False, nullable=True, location="json")
args = parser.parse_args()

# The role of the current user in the ta table must be admin, owner, or editor, or dataset_operator
Expand Down
3 changes: 1 addition & 2 deletions api/services/dataset_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,8 +1058,7 @@ def save_document_without_dataset_id(tenant_id: str, document_data: dict, accoun
retrieval_model = None
if document_data["indexing_technique"] == "high_quality":
dataset_collection_binding = DatasetCollectionBindingService.get_dataset_collection_binding(
document_data['embedding_model_provider'],
document_data['embedding_model']
document_data["embedding_model_provider"], document_data["embedding_model"]
)
dataset_collection_binding_id = dataset_collection_binding.id
if document_data.get("retrieval_model"):
Expand Down

0 comments on commit 190daa2

Please sign in to comment.