NLP Cloud
NLP Cloud is an artificial intelligence platform that allows you to use the most advanced AI engines, and even train your own engines with your own data.
The embeddings endpoint offers the following model:
paraphrase-multilingual-mpnet-base-v2
: Paraphrase Multilingual MPNet Base V2 is a very fast model based on Sentence Transformers that is perfectly suited for embeddings extraction in more than 50 languages (see the full list here).
%pip install --upgrade --quiet nlpcloud
from langchain_community.embeddings import NLPCloudEmbeddings
API Reference:
import os
os.environ["NLPCLOUD_API_KEY"] = "xxx"
nlpcloud_embd = NLPCloudEmbeddings()
text = "This is a test document."
query_result = nlpcloud_embd.embed_query(text)
doc_result = nlpcloud_embd.embed_documents([text])