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