Embedding models create a vector representation of a piece of text. This page documents integrations with various model providers that allow you to use embeddings in LangChain.
pip install -qU langchain-openai
import getpass
import os

if not os.environ.get("OPENAI_API_KEY"):
  os.environ["OPENAI_API_KEY"] = getpass.getpass("Enter API key for OpenAI: ")

from langchain_openai import OpenAIEmbeddings

embeddings = OpenAIEmbeddings(model="text-embedding-3-large")
embeddings.embed_query("Hello, world!")
ProviderPackage
AzureOpenAIlangchain-openai
Ollamalangchain-ollama
Fakelangchain-core
OpenAIlangchain-openai
Google Geminilangchain-google-genai
Togetherlangchain-together
Fireworkslangchain-fireworks
MistralAIlangchain-mistralai
Coherelangchain-cohere
Nomiclangchain-nomic
Databricksdatabricks-langchain
IBMlangchain-ibm
NVIDIAlangchain-nvidia

All embedding models

Aleph Alpha

Anyscale

Ascend

AwaDB

AzureOpenAI

Baichuan Text Embeddings

Baidu Qianfan

Bedrock

BGE on Hugging Face

Bookend AI

Clarifai

Cloudflare Workers AI

Clova Embeddings

Cohere

DashScope

Databricks

DeepInfra

EDEN AI

Elasticsearch

Embaas

Fake Embeddings

FastEmbed by Qdrant

Fireworks

Google Gemini

Google Vertex AI

GPT4All

Gradient

GreenNode

Hugging Face

IBM watsonx.ai

Infinity

Instruct Embeddings

IPEX-LLM CPU

IPEX-LLM GPU

Intel Extension for Transformers

Jina

John Snow Labs

LASER

Lindorm

Llama.cpp

Llamafile

LLMRails

LocalAI

MiniMax

MistralAI

Model2Vec

ModelScope

MosaicML

Naver

Nebius

Netmind

NLP Cloud

Nomic

NVIDIA NIMs

Oracle Cloud Infrastructure

Ollama

OpenClip

OpenAI

OpenVINO

Optimum Intel

Oracle AI Vector Search

OVHcloud

Pinecone Embeddings

PredictionGuard

PremAI

SageMaker

SambaNovaCloud

SambaStudio

Self Hosted

Sentence Transformers

Solar

SpaCy

SparkLLM

TensorFlow Hub

Text Embeddings Inference

TextEmbed

Titan Takeoff

Together AI

Upstage

Volc Engine

Voyage AI

Xinference

YandexGPT

ZhipuAI