diff --git a/rig-lancedb/Cargo.toml b/rig-lancedb/Cargo.toml index 1020e36e..b93644e9 100644 --- a/rig-lancedb/Cargo.toml +++ b/rig-lancedb/Cargo.toml @@ -15,10 +15,6 @@ futures = "0.3.30" tokio = "1.40.0" anyhow = "1.0.89" -[[example]] -name = "fixtures" -required-features = ["rig-core/derive"] - [[example]] name = "vector_search_local_ann" required-features = ["rig-core/derive"] diff --git a/rig-lancedb/examples/fixtures.rs b/rig-lancedb/examples/fixtures/lib.rs similarity index 99% rename from rig-lancedb/examples/fixtures.rs rename to rig-lancedb/examples/fixtures/lib.rs index 8ed72dba..d6e02a5a 100644 --- a/rig-lancedb/examples/fixtures.rs +++ b/rig-lancedb/examples/fixtures/lib.rs @@ -13,8 +13,6 @@ pub struct FakeDefinition { pub definition: String, } -fn main() {} - pub fn fake_definitions() -> Vec { vec![ FakeDefinition { diff --git a/rig-lancedb/examples/vector_search_local_ann.rs b/rig-lancedb/examples/vector_search_local_ann.rs index 09294a67..23ad47b5 100644 --- a/rig-lancedb/examples/vector_search_local_ann.rs +++ b/rig-lancedb/examples/vector_search_local_ann.rs @@ -1,7 +1,7 @@ use std::{env, sync::Arc}; use arrow_array::RecordBatchIterator; -use fixture::{as_record_batch, fake_definitions, schema, FakeDefinition}; +use fixtures::{as_record_batch, fake_definitions, schema, FakeDefinition}; use lancedb::index::vector::IvfPqIndexBuilder; use rig::vector_store::VectorStoreIndex; use rig::{ @@ -10,7 +10,7 @@ use rig::{ }; use rig_lancedb::{LanceDbVectorStore, SearchParams}; -#[path = "./fixtures.rs"] +#[path = "./fixtures/lib.rs"] mod fixture; #[tokio::main] diff --git a/rig-lancedb/examples/vector_search_local_enn.rs b/rig-lancedb/examples/vector_search_local_enn.rs index f3e37d1b..dc492df4 100644 --- a/rig-lancedb/examples/vector_search_local_enn.rs +++ b/rig-lancedb/examples/vector_search_local_enn.rs @@ -1,7 +1,7 @@ use std::{env, sync::Arc}; use arrow_array::RecordBatchIterator; -use fixture::{as_record_batch, fake_definitions, schema}; +use fixtures::{as_record_batch, fake_definitions, schema}; use rig::{ embeddings::{builder::EmbeddingsBuilder, embedding::EmbeddingModel}, providers::openai::{Client, TEXT_EMBEDDING_ADA_002}, @@ -9,7 +9,7 @@ use rig::{ }; use rig_lancedb::{LanceDbVectorStore, SearchParams}; -#[path = "./fixtures.rs"] +#[path = "./fixtures/lib.rs"] mod fixture; #[tokio::main] diff --git a/rig-lancedb/examples/vector_search_s3_ann.rs b/rig-lancedb/examples/vector_search_s3_ann.rs index cb4f8e0f..a521153f 100644 --- a/rig-lancedb/examples/vector_search_s3_ann.rs +++ b/rig-lancedb/examples/vector_search_s3_ann.rs @@ -1,7 +1,7 @@ use std::{env, sync::Arc}; use arrow_array::RecordBatchIterator; -use fixture::{as_record_batch, fake_definitions, schema, FakeDefinition}; +use fixtures::{as_record_batch, fake_definitions, schema, FakeDefinition}; use lancedb::{index::vector::IvfPqIndexBuilder, DistanceType}; use rig::{ embeddings::{builder::EmbeddingsBuilder, embedding::EmbeddingModel}, @@ -10,7 +10,7 @@ use rig::{ }; use rig_lancedb::{LanceDbVectorStore, SearchParams}; -#[path = "./fixtures.rs"] +#[path = "./fixtures/lib.rs"] mod fixture; // Note: see docs to deploy LanceDB on other cloud providers such as google and azure.