Skip to content

Commit

Permalink
chore: fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
appflowy committed Aug 9, 2024
1 parent 8983d68 commit 6580279
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 3 additions & 1 deletion appflowy-local-ai/src/ai_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::collections::HashMap;
use std::fmt::Debug;
use std::sync::Weak;
use tokio_stream::wrappers::ReceiverStream;
use tracing::instrument;
use tracing::{instrument, trace};

pub struct AIPluginOperation {
plugin: Weak<Plugin>,
Expand Down Expand Up @@ -96,6 +96,7 @@ impl AIPluginOperation {
.await
}

#[instrument(level = "debug", skip_all, err)]
pub async fn index_file(
&self,
chat_id: &str,
Expand All @@ -121,6 +122,7 @@ impl AIPluginOperation {
params["file_content"] = json!(content);
}

trace!("[AI Plugin] indexing file: {:?}", params);
self
.send_request::<DefaultResponseParser>(
"index_file",
Expand Down
6 changes: 1 addition & 5 deletions appflowy-local-ai/src/chat_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,7 @@ impl AppFlowyLocalAI {
self.wait_until_plugin_ready().await?;
let plugin = self.get_ai_plugin().await?;
let operation = AIPluginOperation::new(plugin);
trace!(
"[AI Plugin] indexing file: {:?}, content: {:?}",
file_path_str,
file_content
);

operation
.index_file(chat_id, file_path_str, file_content, metadata)
.await?;
Expand Down

0 comments on commit 6580279

Please sign in to comment.