mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-07 02:15:19 +03:00
2.6 KiB
2.6 KiB
Cell:
[Cell type raw - unsupported, skipped]
In [ ]:
# install package
!pip install -U __package_name__In [ ]:
from __module_name__.embeddings import __ModuleName__Embeddings
embeddings = __ModuleName__Embeddings()In [ ]:
embeddings.embed_query("My query to look up")In [ ]:
embeddings.embed_documents(
["This is a content of the document", "This is another document"]
)In [ ]:
# async embed query
await embeddings.aembed_query("My query to look up")In [ ]:
# async embed documents
await embeddings.aembed_documents(
["This is a content of the document", "This is another document"]
)