Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions nucliadb/src/nucliadb/writer/api/v1/knowledgebox.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ async def create_kb(item: KnowledgeBoxConfig) -> tuple[str, str]:
if "semantic_model" in user_learning_config:
user_learning_config["semantic_models"] = [user_learning_config.pop("semantic_model")]

deprecated_keys = [
"semantic_vector_similarity",
"semantic_vector_size",
"semantic_matryoshka_dimensions",
"semantic_model_configs",
"semantic_threshold",
]
for key in deprecated_keys:
user_learning_config.pop(key, None)

# we rely on learning to return the updated configuration with defaults and
# any other needed values (e.g. matryoshka settings if available)
learning_config = await learning_proxy.set_configuration(kbid, config=user_learning_config)
Expand Down
Loading