langchain-nomic¶
Nomic partner integration for LangChain.
Modules:
| Name | Description |
|---|---|
embeddings |
Nomic partner integration for LangChain. |
Classes:
| Name | Description |
|---|---|
NomicEmbeddings |
NomicEmbeddings embedding model. |
NomicEmbeddings
¶
Bases: Embeddings
NomicEmbeddings embedding model.
Example:
.. code-block:: python
from langchain_nomic import NomicEmbeddings
model = NomicEmbeddings()
Methods:
| Name | Description |
|---|---|
aembed_documents |
Asynchronous Embed search docs. |
aembed_query |
Asynchronous Embed query text. |
__init__ |
Initialize NomicEmbeddings model. |
embed |
Embed texts. |
embed_documents |
Embed search docs. |
embed_query |
Embed query text. |
embed_image |
Embed images. |
aembed_documents
async
¶
aembed_query
async
¶
__init__
¶
__init__(
*,
model: str,
nomic_api_key: Optional[str] = None,
dimensionality: Optional[int] = None,
inference_mode: str = "remote",
device: Optional[str] = None,
vision_model: Optional[str] = None
)
Initialize NomicEmbeddings model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
str
|
model name |
required |
nomic_api_key
|
Optional[str]
|
optionally, set the Nomic API key. Uses the |
None
|
dimensionality
|
Optional[int]
|
The embedding dimension, for use with Matryoshka-capable models. Defaults to full-size. |
None
|
inference_mode
|
str
|
How to generate embeddings. One of |
'remote'
|
device
|
Optional[str]
|
The device to use for local embeddings. Choices include
|
None
|
vision_model
|
Optional[str]
|
The vision model to use for image embeddings. |
None
|