JohnSnowLabsEmbeddings#
- class langchain_community.embeddings.johnsnowlabs.JohnSnowLabsEmbeddings[source]#
Bases:
BaseModel
,Embeddings
JohnSnowLabs embedding models
To use, you should have the
johnsnowlabs
python package installed. .. rubric:: Examplefrom langchain_community.embeddings.johnsnowlabs import JohnSnowLabsEmbeddings embedding = JohnSnowLabsEmbeddings(model='embed_sentence.bert') output = embedding.embed_query("foo bar")
Initialize the johnsnowlabs model.
- param model: Any = 'embed_sentence.bert'#
- async aembed_documents(texts: list[str]) list[list[float]] #
Asynchronous Embed search docs.
- Parameters:
texts (list[str]) – List of text to embed.
- Returns:
List of embeddings.
- Return type:
list[list[float]]
- async aembed_query(text: str) list[float] #
Asynchronous Embed query text.
- Parameters:
text (str) – Text to embed.
- Returns:
Embedding.
- Return type:
list[float]
Examples using JohnSnowLabsEmbeddings