diff --git a/appflowy-local-ai/src/embedding_plugin.rs b/appflowy-local-ai/src/embedding_plugin.rs index 7587eb9..57d3d94 100644 --- a/appflowy-local-ai/src/embedding_plugin.rs +++ b/appflowy-local-ai/src/embedding_plugin.rs @@ -38,7 +38,7 @@ impl EmbeddingPluginOperation { .ok_or(PluginError::Internal(anyhow!("Plugin is dropped")))?; let metadata = json!(metadata); let params = - json!({"method": "aindex_document", "params": {"input": message, "metadata": metadata }}); + json!({"method": "index_document", "params": {"input": message, "metadata": metadata }}); plugin .async_request::("handle", ¶ms) .await diff --git a/appflowy-local-ai/src/llm_embedding.rs b/appflowy-local-ai/src/llm_embedding.rs index fd64e69..fda9c50 100644 --- a/appflowy-local-ai/src/llm_embedding.rs +++ b/appflowy-local-ai/src/llm_embedding.rs @@ -67,8 +67,8 @@ impl LocalEmbedding { "absolute_model_path":config.model_path, }); - if let Some(storage_path) = config.storage_path { - params["storage_path"] = json!(storage_path); + if let Some(persist_directory) = config.persist_directory { + params["persist_directory"] = json!(persist_directory); } let plugin = self.plugin_manager.init_plugin(plugin_id, params).await?; @@ -157,7 +157,7 @@ impl LocalEmbedding { pub struct EmbeddingPluginConfig { pub bin_path: PathBuf, pub model_path: PathBuf, - pub storage_path: Option, + pub persist_directory: Option, } impl EmbeddingPluginConfig { @@ -192,7 +192,7 @@ impl EmbeddingPluginConfig { Ok(Self { bin_path, model_path, - storage_path, + persist_directory: storage_path, }) } }