Skip to content

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

Fix conversation model migration (#1857)

Ozan Armağane8590daa5a3f
diff --git a/src/conversation_model_manager.cpp b/src/conversation_model_manager.cpp
index dbcac243..8d2d8cf9 100644
--- a/src/conversation_model_manager.cpp
+++ b/src/conversation_model_manager.cpp
@@ -132,10 +132,6 @@ Option<int> ConversationModelManager::init(Store* store) {
// Migrate models that don't have a conversation collection
if(model_json.count("history_collection") == 0) {
- auto delete_op = delete_model_unsafe(model_id);
- if(!delete_op.ok()) {
- return Option<int>(delete_op.code(), delete_op.error());
- }
auto migrate_op = migrate_model(model_json);
if(!migrate_op.ok()) {
return Option<int>(migrate_op.code(), migrate_op.error());
@@ -181,7 +177,7 @@ Option<Collection*> ConversationModelManager::get_default_history_collection() {
{
"name": "message",
"type": "string",
- "index: false
+ "index": false
},
{
"name": "timestamp",