Embedding

EmbeddingFactory Class Documentation

Overview

The EmbeddingFactory class returns an Langchian's Embeddings class according to the specified embedding type. This class simplifies the process of creating an embedding instance. It provides common embeddings used by RAG workflows.

Usage

from RAGchain.utils.embed import EmbeddingFactory

openai_embedding = EmbeddingFactory(embed_type='openai', device_type='cuda').get()

Supporting Embedding Models

You can use and Embeddings in Langchain. You don't have to use EmbeddingFactory. But, with EmbeddingFactory you can easily get below embedding models.

You can put embed_type string of model that you want to use when initialize EmbeddingFactory.

Last updated