Skip to main content

虚假嵌入

LangChain 还提供了一个虚假嵌入类。您可以使用这个类来测试您的流水线。

from langchain_community.embeddings import 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.