Skip to content

Commit 6b51c89

Browse files
committed
chore: fix test
1 parent 4ebcd3d commit 6b51c89

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

appflowy-local-ai/src/embedding_plugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl EmbeddingPluginOperation {
3838
.ok_or(PluginError::Internal(anyhow!("Plugin is dropped")))?;
3939
let metadata = json!(metadata);
4040
let params =
41-
json!({"method": "aindex_document", "params": {"input": message, "metadata": metadata }});
41+
json!({"method": "index_document", "params": {"input": message, "metadata": metadata }});
4242
plugin
4343
.async_request::<DefaultResponseParser>("handle", &params)
4444
.await

appflowy-local-ai/src/llm_embedding.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ impl LocalEmbedding {
6767
"absolute_model_path":config.model_path,
6868
});
6969

70-
if let Some(storage_path) = config.storage_path {
71-
params["storage_path"] = json!(storage_path);
70+
if let Some(persist_directory) = config.persist_directory {
71+
params["persist_directory"] = json!(persist_directory);
7272
}
7373

7474
let plugin = self.plugin_manager.init_plugin(plugin_id, params).await?;
@@ -157,7 +157,7 @@ impl LocalEmbedding {
157157
pub struct EmbeddingPluginConfig {
158158
pub bin_path: PathBuf,
159159
pub model_path: PathBuf,
160-
pub storage_path: Option<PathBuf>,
160+
pub persist_directory: Option<PathBuf>,
161161
}
162162

163163
impl EmbeddingPluginConfig {
@@ -192,7 +192,7 @@ impl EmbeddingPluginConfig {
192192
Ok(Self {
193193
bin_path,
194194
model_path,
195-
storage_path,
195+
persist_directory: storage_path,
196196
})
197197
}
198198
}

0 commit comments

Comments
 (0)