Skip to main content

Bookend AI

让我们加载 Bookend AI 嵌入模型类。

<!--IMPORTS:[{"imported": "BookendEmbeddings", "source": "langchain_community.embeddings", "docs": "https://python.langchain.com/api_reference/community/embeddings/langchain_community.embeddings.bookend.BookendEmbeddings.html", "title": "Bookend AI"}]-->
from langchain_community.embeddings import BookendEmbeddings
embeddings = BookendEmbeddings(
domain="your_domain",
api_token="your_api_token",
model_id="your_embeddings_model_id",
)
text = "This is a test document."
query_result = embeddings.embed_query(text)
doc_result = embeddings.embed_documents([text])

相关


Was this page helpful?


You can also leave detailed feedback on GitHub.

扫我,入群扫我,找书