我们已完成 1.25 亿美元的 B 轮融资,用于构建代理工程平台。阅读更多。
Python
from langchain_community.embeddings import AlephAlphaAsymmetricSemanticEmbedding
document = "This is a content of the document" query = "What is the content of the document?"
embeddings = AlephAlphaAsymmetricSemanticEmbedding(normalize=True, compress_to_size=128)
doc_result = embeddings.embed_documents([document])
query_result = embeddings.embed_query(query)
from langchain_community.embeddings import AlephAlphaSymmetricSemanticEmbedding
text = "This is a test text"
embeddings = AlephAlphaSymmetricSemanticEmbedding(normalize=True, compress_to_size=128)
doc_result = embeddings.embed_documents([text])
query_result = embeddings.embed_query(text)
此页面有帮助吗?