From 953e2087c5b1c6d72a32e63a6b239e88354345c4 Mon Sep 17 00:00:00 2001 From: andthattoo Date: Mon, 22 Jul 2024 18:09:34 +0300 Subject: [PATCH] send + sync added to embedder --- src/memory/files.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/memory/files.rs b/src/memory/files.rs index 9dc6f94..01736af 100644 --- a/src/memory/files.rs +++ b/src/memory/files.rs @@ -17,7 +17,7 @@ use text_splitter::TextSplitter; pub static EMBEDDING_MODEL: &str = "hellord/mxbai-embed-large-v1:f16"; #[async_trait] -pub trait Embedder { +pub trait Embedder: Send + Sync { async fn generate_embeddings(&self, prompt: &str) -> Result, EmbeddingError>; async fn generate_query_embeddings(&self, query: &str) -> Result, EmbeddingError>; }