diff --git a/rig-sqlite/examples/vector_search_sqlite.rs b/rig-sqlite/examples/vector_search_sqlite.rs index 49c2ba73..85c68efc 100644 --- a/rig-sqlite/examples/vector_search_sqlite.rs +++ b/rig-sqlite/examples/vector_search_sqlite.rs @@ -43,7 +43,7 @@ async fn main() -> Result<(), anyhow::Error> { .await?; // Initialize SQLite vector store - let mut vector_store = SqliteVectorStore::new(conn, model.clone()).await?; + let mut vector_store = SqliteVectorStore::new(conn, &model).await?; // Add embeddings to vector store match vector_store.add_documents(embeddings).await { diff --git a/rig-sqlite/src/lib.rs b/rig-sqlite/src/lib.rs index 8760540a..6f777400 100644 --- a/rig-sqlite/src/lib.rs +++ b/rig-sqlite/src/lib.rs @@ -20,7 +20,7 @@ pub struct SqliteVectorStore { } impl SqliteVectorStore { - pub async fn new(conn: Connection, embedding_model: E) -> Result { + pub async fn new(conn: Connection, embedding_model: &E) -> Result { // Run migrations or create tables if they don't exist let dims = embedding_model.ndims(); conn.call(move |conn| {