Skip to main content

Fake Embeddings

LangChain also provides a fake embedding class. You can use this to test your pipelines.

from langchain_community.embeddings import FakeEmbeddings
API Reference:FakeEmbeddings
embeddings = FakeEmbeddings(size=1352)
query_result = embeddings.embed_query("foo")
doc_results = embeddings.embed_documents(["foo"])

Was this page helpful?


You can leave detailed feedback on GitHub.