embeddings#

Embedding models are wrappers around embedding models from different APIs and services.

Embedding models can be LLMs or not.

Class hierarchy:

Embeddings --> <name>Embeddings  # Examples: OpenAIEmbeddings, HuggingFaceEmbeddings

Classes

embeddings.aleph_alpha.AlephAlphaAsymmetricSemanticEmbedding

Aleph Alpha's asymmetric semantic embedding.

embeddings.aleph_alpha.AlephAlphaSymmetricSemanticEmbedding

Symmetric version of the Aleph Alpha's semantic embeddings.

embeddings.anyscale.AnyscaleEmbeddings

Anyscale Embeddings API.

embeddings.ascend.AscendEmbeddings

Ascend NPU accelerate Embedding model

embeddings.awa.AwaEmbeddings

Embedding documents and queries with Awa DB.

embeddings.baichuan.BaichuanTextEmbeddings

Baichuan Text Embedding models.

embeddings.baidu_qianfan_endpoint.QianfanEmbeddingsEndpoint

Baidu Qianfan Embeddings embedding models.

embeddings.bookend.BookendEmbeddings

Bookend AI sentence_transformers embedding models.

embeddings.clarifai.ClarifaiEmbeddings

Clarifai embedding models.

embeddings.cloudflare_workersai.CloudflareWorkersAIEmbeddings

Cloudflare Workers AI embedding model.

embeddings.dashscope.DashScopeEmbeddings

DashScope embedding models.

embeddings.deepinfra.DeepInfraEmbeddings

Deep Infra's embedding inference service.

embeddings.edenai.EdenAiEmbeddings

EdenAI embedding.

embeddings.embaas.EmbaasEmbeddings

Embaas's embedding service.

embeddings.embaas.EmbaasEmbeddingsPayload

Payload for the Embaas embeddings API.

embeddings.fake.DeterministicFakeEmbedding

Fake embedding model that always returns the same embedding vector for the same text.

embeddings.fake.FakeEmbeddings

Fake embedding model.

embeddings.fastembed.FastEmbedEmbeddings

Qdrant FastEmbedding models.

embeddings.google_palm.GooglePalmEmbeddings

Google's PaLM Embeddings APIs.

embeddings.gpt4all.GPT4AllEmbeddings

GPT4All embedding models.

embeddings.gradient_ai.GradientEmbeddings

Gradient.ai Embedding models.

embeddings.gradient_ai.TinyAsyncGradientEmbeddingClient(...)

Deprecated, TinyAsyncGradientEmbeddingClient was removed.

embeddings.huggingface.HuggingFaceInferenceAPIEmbeddings

Embed texts using the HuggingFace API.

embeddings.huggingface.HuggingFaceInstructEmbeddings

Wrapper around sentence_transformers embedding models.

embeddings.hunyuan.HunyuanEmbeddings

Tencent Hunyuan embedding models API by Tencent.

embeddings.infinity.InfinityEmbeddings

Self-hosted embedding models for infinity package.

embeddings.infinity.TinyAsyncOpenAIInfinityEmbeddingClient([...])

Helper tool to embed Infinity.

embeddings.infinity_local.InfinityEmbeddingsLocal

Optimized Infinity embedding models.

embeddings.ipex_llm.IpexLLMBgeEmbeddings

Wrapper around the BGE embedding model with IPEX-LLM optimizations on Intel CPUs and GPUs.

embeddings.itrex.QuantizedBgeEmbeddings

Leverage Itrex runtime to unlock the performance of compressed NLP models.

embeddings.javelin_ai_gateway.JavelinAIGatewayEmbeddings

Javelin AI Gateway embeddings.

embeddings.jina.JinaEmbeddings

Jina embedding models.

embeddings.johnsnowlabs.JohnSnowLabsEmbeddings

JohnSnowLabs embedding models

embeddings.laser.LaserEmbeddings

LASER Language-Agnostic SEntence Representations.

embeddings.llamacpp.LlamaCppEmbeddings

llama.cpp embedding models.

embeddings.llamafile.LlamafileEmbeddings

Llamafile lets you distribute and run large language models with a single file.

embeddings.llm_rails.LLMRailsEmbeddings

LLMRails embedding models.

embeddings.localai.LocalAIEmbeddings

LocalAI embedding models.

embeddings.minimax.MiniMaxEmbeddings

MiniMax embedding model integration.

embeddings.mlflow.MlflowCohereEmbeddings

Cohere embedding LLMs in MLflow.

embeddings.mlflow.MlflowEmbeddings

Embedding LLMs in MLflow.

embeddings.mlflow_gateway.MlflowAIGatewayEmbeddings

MLflow AI Gateway embeddings.

embeddings.model2vec.Model2vecEmbeddings(model)

Model2Vec embedding models.

embeddings.modelscope_hub.ModelScopeEmbeddings

ModelScopeHub embedding models.

embeddings.mosaicml.MosaicMLInstructorEmbeddings

MosaicML embedding service.

embeddings.naver.ClovaXEmbeddings

NCP ClovaStudio Embedding API.

embeddings.nlpcloud.NLPCloudEmbeddings

NLP Cloud embedding models.

embeddings.oci_generative_ai.OCIAuthType(value)

OCI authentication types as enumerator.

embeddings.oci_generative_ai.OCIGenAIEmbeddings

OCI embedding models.

embeddings.octoai_embeddings.OctoAIEmbeddings

OctoAI Compute Service embedding models.

embeddings.openvino.OpenVINOBgeEmbeddings

OpenVNO BGE embedding models.

embeddings.openvino.OpenVINOEmbeddings

OpenVINO embedding models.

embeddings.optimum_intel.QuantizedBiEncoderEmbeddings

Quantized bi-encoders embedding models.

embeddings.oracleai.OracleEmbeddings

Get Embeddings

embeddings.ovhcloud.OVHCloudEmbeddings

OVHcloud AI Endpoints Embeddings.

embeddings.premai.PremAIEmbeddings

Prem's Embedding APIs

embeddings.sagemaker_endpoint.EmbeddingsContentHandler()

Content handler for LLM class.

embeddings.sagemaker_endpoint.SagemakerEndpointEmbeddings

Custom Sagemaker Inference Endpoints.

embeddings.sambanova.SambaStudioEmbeddings

SambaNova embedding models.

embeddings.self_hosted.SelfHostedEmbeddings

Custom embedding models on self-hosted remote hardware.

embeddings.self_hosted_hugging_face.SelfHostedHuggingFaceEmbeddings

HuggingFace embedding models on self-hosted remote hardware.

embeddings.self_hosted_hugging_face.SelfHostedHuggingFaceInstructEmbeddings

HuggingFace InstructEmbedding models on self-hosted remote hardware.

embeddings.spacy_embeddings.SpacyEmbeddings

Embeddings by spaCy models.

embeddings.sparkllm.AssembleHeaderException(msg)

Exception raised for errors in the header assembly.

embeddings.sparkllm.SparkLLMTextEmbeddings

SparkLLM embedding model integration.

embeddings.sparkllm.Url(host, path, schema)

URL class for parsing the URL.

embeddings.tensorflow_hub.TensorflowHubEmbeddings

TensorflowHub embedding models.

embeddings.text2vec.Text2vecEmbeddings

text2vec embedding models.

embeddings.textembed.AsyncOpenAITextEmbedEmbeddingClient([...])

A client to handle synchronous and asynchronous requests to the TextEmbed API.

embeddings.textembed.TextEmbedEmbeddings

A class to handle embedding requests to the TextEmbed API.

embeddings.titan_takeoff.Device(value[, ...])

Device to use for inference, cuda or cpu.

embeddings.titan_takeoff.MissingConsumerGroup

Exception raised when no consumer group is provided on initialization of TitanTakeoffEmbed or in embed request.

embeddings.titan_takeoff.ReaderConfig

Configuration for the reader to be deployed in Takeoff.

embeddings.titan_takeoff.TakeoffEmbeddingException

Custom exception for interfacing with Takeoff Embedding class.

embeddings.titan_takeoff.TitanTakeoffEmbed([...])

Interface with Takeoff Inference API for embedding models.

embeddings.volcengine.VolcanoEmbeddings

Volcengine Embeddings embedding models.

embeddings.xinference.XinferenceEmbeddings([...])

Xinference embedding models.

embeddings.yandex.YandexGPTEmbeddings

YandexGPT Embeddings models.

embeddings.zhipuai.ZhipuAIEmbeddings

ZhipuAI embedding model integration.

Functions

embeddings.dashscope.embed_with_retry(...)

Use tenacity to retry the embedding call.

embeddings.google_palm.embed_with_retry(...)

Use tenacity to retry the completion call.

embeddings.jina.get_bytes_str(file_path)

Get the bytes string of a file.

embeddings.jina.is_local(url)

Check if a URL is a local file.

embeddings.localai.async_embed_with_retry(...)

Use tenacity to retry the embedding call.

embeddings.localai.embed_with_retry(...)

Use tenacity to retry the embedding call.

embeddings.minimax.embed_with_retry(...)

Use tenacity to retry the completion call.

embeddings.nemo.is_endpoint_live(url, ...)

Check if an endpoint is live by sending a GET request to the specified URL.

embeddings.openai.async_embed_with_retry(...)

Use tenacity to retry the embedding call.

embeddings.openai.embed_with_retry(...)

Use tenacity to retry the embedding call.

embeddings.premai.create_prem_retry_decorator(...)

Create a retry decorator for PremAIEmbeddings.

embeddings.premai.embed_with_retry(embedder, ...)

Using tenacity for retry in embedding calls

embeddings.self_hosted_hugging_face.load_embedding_model(...)

Load the embedding model.

embeddings.solar.embed_with_retry(...)

Use tenacity to retry the completion call.

embeddings.voyageai.embed_with_retry(...)

Use tenacity to retry the embedding call.

Deprecated classes