LocalAI embedding models.
Since LocalAI and OpenAI have 1:1 compatibility between APIs, this class
uses the openai Python package's openai.Embedding as its client.
Thus, you should have the `
Javelin AI Gateway embeddings.
To use, you should have the javelin_sdk python package installed.
For more information, see https://docs.getjavelin.io
Fake embedding model.
Fake embedding model that always returns the same embedding vector for the same text.
Custom exception for interfacing with Takeoff Embedding class.
Exception raised when no consumer group is provided on initialization of TitanTakeoffEmbed or in embed request.
Device to use for inference, cuda or cpu.
Configuration for the reader to be deployed in Takeoff.
Interface with Takeoff Inference API for embedding models.
Use it to send embedding requests and to deploy embedding readers with Takeoff.
Content handler for LLM class.
Custom Sagemaker Inference Endpoints.
To use, you must supply the endpoint name from your deployed Sagemaker model & the region where it is deployed.
To authenticate, the AWS client uses the followi
Google's PaLM Embeddings APIs.
Tencent Hunyuan embedding models API by Tencent.
For more information, see https://cloud.tencent.com/document/product/1729
NCP ClovaStudio Embedding API.
following environment variables set or passed in constructor in lower case:
NCP_CLOVASTUDIO_API_KEYNCP_APIGW_API_KEYNCP_CLOVASTUDIO_APP_IDOCI authentication types as enumerator.
OCI embedding models.
To authenticate, the OCI client uses the methods described in https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_authentication_methods.htm
The authentifcation method
Payload for the Embaas embeddings API.
Embaas's embedding service.
To use, you should have the
environment variable EMBAAS_API_KEY set with your API key, or pass
it as a named parameter to the constructor.
MiniMax embedding model integration.
JohnSnowLabs embedding models
To use, you should have the johnsnowlabs python package installed.
Example:
.. code-block:: python
from langchain_community.embeddings.johnsnowlabs impo
Baichuan Text Embedding models.
URL class for parsing the URL.
SparkLLM embedding model integration.
Exception raised for errors in the header assembly.
MLflow AI Gateway embeddings.
To use, you should have the mlflow[gateway] python package installed.
For more information, see https://mlflow.org/docs/latest/gateway/index.html.
EdenAI embedding.
environment variable EDENAI_API_KEY set with your API key, or pass
it as a named parameter.
NLP Cloud embedding models.
To use, you should have the nlpcloud python package installed
MosaicML embedding service.
To use, you should have the
environment variable MOSAICML_API_TOKEN set with your API token, or pass
it as a named parameter to the constructor.
TensorflowHub embedding models.
To use, you should have the tensorflow_text python package installed.
Embedding LLMs in MLflow.
To use, you should have the mlflow[genai] python package installed.
For more information, see https://mlflow.org/docs/latest/llms/deployments.
Cohere embedding LLMs in MLflow.
Embeddings by spaCy models.
llama.cpp embedding models.
To use, you should have the llama-cpp-python library installed, and provide the path to the Llama model as a named parameter to the constructor. Check out: https://github.
Anyscale Embeddings API.
Prem's Embedding APIs
Volcengine Embeddings embedding models.
OctoAI Compute Service embedding models.
See https://octo.ai/ for information about OctoAI.
To use, you should have the openai python package installed and the
environment variable ``OCTOAI_API_
OpenVINO embedding models.
OpenVNO BGE embedding models.
Embedding documents and queries with Awa DB.
ModelScopeHub embedding models.
To use, you should have the modelscope python package installed.
Ascend NPU accelerate Embedding model
Please ensure that you have installed CANN and torch_npu.
Example:
from langchain_community.embeddings import AscendEmbeddings model = AscendEmbeddings(model_p
text2vec embedding models.
Install text2vec first, run 'pip install -U text2vec'. The github repository for text2vec is : https://github.com/shibing624/text2vec
Jina embedding models.
HuggingFace embedding models on self-hosted remote hardware.
Supported hardware includes auto-launched instances on AWS, GCP, Azure, and Lambda, as well as servers specified by IP address and SSH cre
HuggingFace InstructEmbedding models on self-hosted remote hardware.
Supported hardware includes auto-launched instances on AWS, GCP, Azure, and Lambda, as well as servers specified by IP address and
Custom embedding models on self-hosted remote hardware.
Supported hardware includes auto-launched instances on AWS, GCP, Azure, and Lambda, as well as servers specified by IP address and SSH credenti
Bookend AI sentence_transformers embedding models.
ZhipuAI embedding model integration.
Setup:
To use, you should have the ``zhipuai`` python package installed, and the
environment variable ``ZHIPU_API_KEY`` set with your API KEY.
More
LLMRails embedding models.
To use, you should have the environment
variable LLM_RAILS_API_KEY set with your API key or pass it
as a named parameter to the constructor.
Model can be one of ["emb
YandexGPT Embeddings models.
To use, you should have the yandexcloud python package installed.
There are two authentication options for the service account
with the ai.languageModels.user ro
GPT4All embedding models.
To use, you should have the gpt4all python package installed
Gradient.ai Embedding models.
GradientLLM is a class to interact with Embedding Models on gradient.ai
To use, set the environment variable GRADIENT_ACCESS_TOKEN with your
API token and ``GRADIEN
Deprecated, TinyAsyncGradientEmbeddingClient was removed.
This class is just for backwards compatibility with older versions of langchain_community. It might be entirely removed in the future.
Llamafile lets you distribute and run large language models with a single file.
To get started, see: https://github.com/Mozilla-Ocho/llamafile
To use this class, you will need to first:
OVHcloud AI Endpoints Embeddings.
Model2Vec embedding models.
Install model2vec first, run 'pip install -U model2vec'. The github repository for model2vec is : https://github.com/MinishLab/model2vec
Quantized bi-encoders embedding models.
Please ensure that you have installed optimum-intel and ipex.
A class to handle embedding requests to the TextEmbed API.
A client to handle synchronous and asynchronous requests to the TextEmbed API.
Optimized Infinity embedding models.
https://github.com/michaelfeil/infinity This class deploys a local Infinity instance to embed text. The class requires async usage.
Infinity is a class to intera
DashScope embedding models.
To use, you should have the dashscope python package installed, and the
environment variable DASHSCOPE_API_KEY set with your API key or pass it
as a named paramete
Qdrant FastEmbedding models.
FastEmbed is a lightweight, fast, Python library built for embedding generation. See more documentation at:
Xinference embedding models.
To use, you should have the xinference library installed:
.. code-block:: bash
pip install xinference
If you're simply using the services provided by Xinference, y
Baidu Qianfan Embeddings embedding models.
Self-hosted embedding models for infinity package.
See https://github.com/michaelfeil/infinity This also works for text-embeddings-inference and other self-hosted openai-compatible servers.
Infini
Helper tool to embed Infinity.
It is not a part of Langchain's stable API, direct use discouraged.
Deep Infra's embedding inference service.
To use, you should have the
environment variable DEEPINFRA_API_TOKEN set with your API token, or pass
it as a named parameter to the constructor.
There a
Leverage Itrex runtime to unlock the performance of compressed NLP models.
Please ensure that you have installed intel-extension-for-transformers.
Aleph Alpha's asymmetric semantic embedding.
AA provides you with an endpoint to embed a document and a query. The models were optimized to make the embeddings of documents and the query for a docume
Symmetric version of the Aleph Alpha's semantic embeddings.
The main difference is that here, both the documents and queries are embedded with a SemanticRepresentation.Symmetric Example: .. code-
Clarifai embedding models.
To use, you should have the clarifai python package installed, and the
environment variable CLARIFAI_PAT set with your personal access token or pass it
as a named p
LASER Language-Agnostic SEntence Representations. LASER is a Python library developed by the Meta AI Research team and used for creating multilingual sentence embeddings for over 147 languages as of 2
Wrapper around the BGE embedding model with IPEX-LLM optimizations on Intel CPUs and GPUs.
To use, you should have the ipex-llm
and sentence_transformers package installed. Refer to
`here <ht
GigaChat Embeddings models.
Get Embeddings
NeMo embedding models.
Cohere embedding models.
To use, you should have the cohere python package installed, and the
environment variable COHERE_API_KEY set with your API key or pass it
as a named parameter to the
Elasticsearch embedding models.
This class provides an interface to generate embeddings using a model deployed in an Elasticsearch cluster. It requires an Elasticsearch connection object and the mode
OpenAI embedding models.
To use, you should have the openai python package installed, and the
environment variable OPENAI_API_KEY set with your API key or pass it
as a named parameter to the
SambaNova embedding models.
To use, you should have the environment variables
SAMBASTUDIO_EMBEDDINGS_BASE_URL, SAMBASTUDIO_EMBEDDINGS_BASE_URI
SAMBASTUDIO_EMBEDDINGS_PROJECT_ID, ``SAMBAST
HuggingFace sentence_transformers embedding models.
To use, you should have the sentence_transformers python package installed.
Wrapper around sentence_transformers embedding models.
To use, you should have the sentence_transformers
and InstructorEmbedding python packages installed.
HuggingFace sentence_transformers embedding models.
To use, you should have the sentence_transformers python package installed.
To use Nomic, make sure the version of sentence_transformers >=
Embed texts using the HuggingFace API.
Requires a HuggingFace Inference API key and a model name.
Ernie Embeddings V1 embedding models.
Google Cloud VertexAI embedding models.
Solar's embedding service.
To use, you should have the environment variableSOLAR_API_KEY set
with your API token, or pass it as a named parameter to the constructor.
Ollama locally runs large language models.
To use, follow the instructions at https://ollama.ai/.
Bedrock embedding models.
To authenticate, the AWS client uses the following methods to automatically load credentials: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html
Voyage embedding models.
To use, you should have the environment variable VOYAGE_API_KEY set with
your API key or pass it as a named parameter to the constructor.
HuggingFaceHub embedding models.
To use, you should have the huggingface_hub python package installed, and the
environment variable HUGGINGFACEHUB_API_TOKEN set with your API token, or pass
i
Databricks embeddings.
To use, you should have the mlflow python package installed.
For more information, see https://mlflow.org/docs/latest/llms/deployments.
Cloudflare Workers AI embedding model.
To use, you need to provide an API token and account ID to access Cloudflare Workers AI.
Clova's embedding service.
To use this service,
you should have the following environment variables set with your API tokens and application ID, or pass them as named parameters to the constructor:
Azure OpenAI Embeddings API.
Use tenacity to retry the embedding call.
Use tenacity to retry the embedding call.
Check if an endpoint is live by sending a GET request to the specified URL.
Use tenacity to retry the completion call.
Use tenacity to retry the completion call.
Use tenacity to retry the embedding call.
Use tenacity to retry the embedding call.
Create a retry decorator for PremAIEmbeddings.
Using tenacity for retry in embedding calls
Use tenacity to retry the completion call.
Check if a URL is a local file.
Get the bytes string of a file.
Load the embedding model.
Use tenacity to retry the embedding call.
Use tenacity to retry the embedding call.