llm_kernel/embedding/
mod.rs1pub mod catalog;
11pub mod types;
12
13#[cfg(feature = "embedding-openai")]
14pub mod openai;
15
16#[cfg(any(
17 feature = "embedding-fastembed",
18 feature = "embedding-fastembed-dynamic-linking"
19))]
20pub mod fastembed;
21
22#[cfg(any(
23 feature = "embedding-fastembed",
24 feature = "embedding-fastembed-dynamic-linking"
25))]
26pub mod lazy;
27
28#[cfg(any(
30 feature = "embedding-fastembed",
31 feature = "embedding-fastembed-dynamic-linking"
32))]
33pub mod bgem3;
34
35#[cfg(feature = "embedding-fastembed-qwen3")]
36pub mod qwen3;
37
38#[cfg(feature = "embedding-fastembed-nomic-moe")]
39pub mod nomic_moe;
40
41#[cfg(all(feature = "embedding-mlx", target_os = "macos"))]
43pub mod mlx;
44
45pub mod vector_index;
47
48pub mod sparse;
50
51pub mod async_vector_index;
53
54#[cfg(feature = "qdrant")]
56pub mod qdrant;
57
58#[cfg(feature = "elastic")]
60pub mod elastic;
61
62#[cfg(feature = "pgvector")]
64pub mod pgvector;
65
66#[cfg(feature = "vector-index")]
67pub mod turbovec;
68
69pub use catalog::EmbeddingModel;
70pub use types::{EmbeddingProvider, EmbeddingResult, chunk_batch, cosine_similarity};
71
72#[cfg(feature = "embedding-openai")]
73pub use openai::OpenAIEmbeddingClient;
74
75#[cfg(any(
76 feature = "embedding-fastembed",
77 feature = "embedding-fastembed-dynamic-linking"
78))]
79pub use fastembed::FastembedProvider;
80
81#[cfg(any(
82 feature = "embedding-fastembed",
83 feature = "embedding-fastembed-dynamic-linking"
84))]
85pub use bgem3::{BGEM3_DENSE_DIM, BGEM3_VOCAB_SIZE, Bgem3Provider, JointEmbedding};
86
87#[cfg(any(
88 feature = "embedding-fastembed",
89 feature = "embedding-fastembed-dynamic-linking"
90))]
91pub use lazy::{EmbeddingCache, LazyFastembedProvider, LazyOpts, ModelState, is_model_cached};
92
93#[cfg(feature = "embedding-fastembed-qwen3")]
94pub use qwen3::Qwen3Provider;
95
96#[cfg(feature = "embedding-fastembed-nomic-moe")]
97pub use nomic_moe::NomicMoeProvider;
98
99#[cfg(all(feature = "embedding-mlx", target_os = "macos"))]
100pub use mlx::MlxEmbeddingProvider;
101
102#[cfg(feature = "embedding-fastembed-directml")]
109pub use ort;
110
111pub use async_vector_index::AsyncVectorIndex;
112pub use sparse::SparseVector;
113pub use vector_index::{Fusion, SearchHit, VectorIndex};
114
115#[cfg(feature = "qdrant")]
116pub use qdrant::QdrantVectorIndex;
117
118#[cfg(feature = "elastic")]
119pub use elastic::ElasticsearchVectorIndex;
120
121#[cfg(feature = "pgvector")]
122pub use pgvector::{PgSparseVectorIndex, PgVectorIndex, PgVectorOpts};
123
124#[cfg(feature = "vector-index")]
125pub use turbovec::{IndexMeta, TurbovecIndex};