LangChain 1 · Retrieval (RAG)

Create an embeddings model

Create an embedding model from a provider:model string. Needs that provider's package and API key.

from langchain.embeddings import init_embeddings

embeddings = init_embeddings("openai:text-embedding-3-small")

Official LangChain 1 documentation

More retrieval (rag) commands

All retrieval (rag) commands · LangChain 1 cheatsheet

Was this page helpful?