Model2vecEmbeddings(
self,
model: str,
)| Name | Type | Description |
|---|---|---|
model* | str | Model name. |
| Name | Type |
|---|---|
| model | str |
Model2Vec embedding models.
Install model2vec first, run 'pip install -U model2vec'. The github repository for model2vec is : https://github.com/MinishLab/model2vec
Example:
.. code-block:: python
from langchain_community.embeddings import Model2vecEmbeddings
embedding = Model2vecEmbeddings("minishlab/potion-base-8M") embedding.embed_documents([ "It's dangerous to go alone!", "It's a secret to everybody.", ]) embedding.embed_query( "Take this with you." )