generalize the generation of new collection name by dataset id (#2620)

This commit is contained in:
Bowen Liang
2024-02-29 12:47:10 +08:00
committed by GitHub
parent 0428f44113
commit 801d135390
5 changed files with 12 additions and 8 deletions

View File

@@ -1244,7 +1244,7 @@ class DatasetCollectionBindingService:
dataset_collection_binding = DatasetCollectionBinding(
provider_name=provider_name,
model_name=model_name,
collection_name="Vector_index_" + str(uuid.uuid4()).replace("-", "_") + '_Node',
collection_name=Dataset.gen_collection_name_by_id(str(uuid.uuid4())),
type=collection_type
)
db.session.add(dataset_collection_binding)