Expand description
This module provides functionality for working with embeddings. Embeddings are numerical representations of documents or other objects, typically used in natural language processing (NLP) tasks such as text classification, information retrieval, and document similarity.
Re-exports§
pub use builder::EmbeddingsBuilder;
pub use embed::Embed;
pub use embed::EmbedError;
pub use embed::TextEmbedder;
pub use embed::to_texts;
pub use embedding::Embedding;
pub use embedding::EmbeddingError;
pub use embedding::EmbeddingModel;
pub use tool::ToolSchema;
Modules§
- builder
- The module defines the EmbeddingsBuilder struct which accumulates objects to be embedded and batch generates the embeddings for each object when built. Only types that implement the Embed trait can be added to the EmbeddingsBuilder.
- distance
- embed
- The module defines the Embed trait, which must be implemented for types that can be embedded by the crate::embeddings::EmbeddingsBuilder.
- embedding
- The module defines the EmbeddingModel trait, which represents an embedding model that can generate embeddings for documents.
- tool
- The module defines the ToolSchema struct, which is used to embed an object that implements crate::tool::ToolEmbedding