mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-06 18:05:25 +03:00
3.3 KiB
3.3 KiB
In [2]:
from langchain.embeddings import AlephAlphaAsymmetricSemanticEmbeddingIn [3]:
document = "This is a content of the document"
query = "What is the contnt of the document?"In [ ]:
embeddings = AlephAlphaAsymmetricSemanticEmbedding()In [ ]:
doc_result = embeddings.embed_documents([document])In [ ]:
query_result = embeddings.embed_query(query)In [ ]:
from langchain.embeddings import AlephAlphaSymmetricSemanticEmbeddingIn [4]:
text = "This is a test text"In [ ]:
embeddings = AlephAlphaSymmetricSemanticEmbedding()In [ ]:
doc_result = embeddings.embed_documents([text])In [ ]:
query_result = embeddings.embed_query(text)In [ ]: