langchain-nomic 0.1.1__py3-none-any.whl → 0.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- langchain_nomic/__init__.py +1 -3
- langchain_nomic/embeddings.py +11 -0
- {langchain_nomic-0.1.1.dist-info → langchain_nomic-0.1.3.dist-info}/METADATA +6 -4
- langchain_nomic-0.1.3.dist-info/RECORD +7 -0
- langchain_nomic-0.1.1.dist-info/RECORD +0 -7
- {langchain_nomic-0.1.1.dist-info → langchain_nomic-0.1.3.dist-info}/LICENSE +0 -0
- {langchain_nomic-0.1.1.dist-info → langchain_nomic-0.1.3.dist-info}/WHEEL +0 -0
langchain_nomic/__init__.py
CHANGED
langchain_nomic/embeddings.py
CHANGED
@@ -22,6 +22,7 @@ class NomicEmbeddings(Embeddings):
|
|
22
22
|
self,
|
23
23
|
*,
|
24
24
|
model: str,
|
25
|
+
nomic_api_key: Optional[str] = ...,
|
25
26
|
dimensionality: Optional[int] = ...,
|
26
27
|
inference_mode: Literal["remote"] = ...,
|
27
28
|
):
|
@@ -32,6 +33,7 @@ class NomicEmbeddings(Embeddings):
|
|
32
33
|
self,
|
33
34
|
*,
|
34
35
|
model: str,
|
36
|
+
nomic_api_key: Optional[str] = ...,
|
35
37
|
dimensionality: Optional[int] = ...,
|
36
38
|
inference_mode: Literal["local", "dynamic"],
|
37
39
|
device: Optional[str] = ...,
|
@@ -43,6 +45,7 @@ class NomicEmbeddings(Embeddings):
|
|
43
45
|
self,
|
44
46
|
*,
|
45
47
|
model: str,
|
48
|
+
nomic_api_key: Optional[str] = ...,
|
46
49
|
dimensionality: Optional[int] = ...,
|
47
50
|
inference_mode: str,
|
48
51
|
device: Optional[str] = ...,
|
@@ -57,6 +60,7 @@ class NomicEmbeddings(Embeddings):
|
|
57
60
|
dimensionality: Optional[int] = None,
|
58
61
|
inference_mode: str = "remote",
|
59
62
|
device: Optional[str] = None,
|
63
|
+
vision_model: Optional[str] = None,
|
60
64
|
):
|
61
65
|
"""Initialize NomicEmbeddings model.
|
62
66
|
|
@@ -80,6 +84,7 @@ class NomicEmbeddings(Embeddings):
|
|
80
84
|
self.dimensionality = dimensionality
|
81
85
|
self.inference_mode = inference_mode
|
82
86
|
self.device = device
|
87
|
+
self.vision_model = vision_model
|
83
88
|
|
84
89
|
def embed(self, texts: List[str], *, task_type: str) -> List[List[float]]:
|
85
90
|
"""Embed texts.
|
@@ -121,3 +126,9 @@ class NomicEmbeddings(Embeddings):
|
|
121
126
|
texts=[text],
|
122
127
|
task_type="search_query",
|
123
128
|
)[0]
|
129
|
+
|
130
|
+
def embed_image(self, uris: List[str]) -> List[List[float]]:
|
131
|
+
return embed.image(
|
132
|
+
images=uris,
|
133
|
+
model=self.vision_model,
|
134
|
+
)["embeddings"]
|
@@ -1,19 +1,21 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: langchain-nomic
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.3
|
4
4
|
Summary: An integration package connecting Nomic and LangChain
|
5
5
|
Home-page: https://github.com/langchain-ai/langchain
|
6
6
|
License: MIT
|
7
|
-
Requires-Python: >=3.
|
7
|
+
Requires-Python: >=3.9,<4.0
|
8
8
|
Classifier: License :: OSI Approved :: MIT License
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
10
10
|
Classifier: Programming Language :: Python :: 3.9
|
11
11
|
Classifier: Programming Language :: Python :: 3.10
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
14
|
-
Requires-Dist: langchain-core (>=0.
|
15
|
-
Requires-Dist: nomic (>=3.
|
14
|
+
Requires-Dist: langchain-core (>=0.2.40,<0.4)
|
15
|
+
Requires-Dist: nomic (>=3.1.2,<4.0.0)
|
16
|
+
Requires-Dist: pillow (>=10.3.0,<11.0.0)
|
16
17
|
Project-URL: Repository, https://github.com/langchain-ai/langchain
|
18
|
+
Project-URL: Release Notes, https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain-nomic%3D%3D0%22&expanded=true
|
17
19
|
Project-URL: Source Code, https://github.com/langchain-ai/langchain/tree/master/libs/partners/nomic
|
18
20
|
Description-Content-Type: text/markdown
|
19
21
|
|
@@ -0,0 +1,7 @@
|
|
1
|
+
langchain_nomic/__init__.py,sha256=MYethT7Ss07B2-ZHi0Y61JONOTXUtp_VTFW1ES-ydKM,86
|
2
|
+
langchain_nomic/embeddings.py,sha256=9llrozY7UJnwB9hrJxbPamC35Opn1aVbeaoHn1wHYa8,3892
|
3
|
+
langchain_nomic/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
+
langchain_nomic-0.1.3.dist-info/LICENSE,sha256=DppmdYJVSc1jd0aio6ptnMUn5tIHrdAhQ12SclEBfBg,1072
|
5
|
+
langchain_nomic-0.1.3.dist-info/METADATA,sha256=EFiDkGgnaubbTQsNxraA4GmwBQo5ag-it5sTA_oAKYs,1458
|
6
|
+
langchain_nomic-0.1.3.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
7
|
+
langchain_nomic-0.1.3.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
langchain_nomic/__init__.py,sha256=MQEfQNlmqQ0aGXXR7fngtWlJJeC6R4zcDhcXucjqvLE,93
|
2
|
-
langchain_nomic/embeddings.py,sha256=qA-7yS_IcMS5BPpTRwN_ANS9qkHWMErgP7mV6811qvw,3495
|
3
|
-
langchain_nomic/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
langchain_nomic-0.1.1.dist-info/LICENSE,sha256=DppmdYJVSc1jd0aio6ptnMUn5tIHrdAhQ12SclEBfBg,1072
|
5
|
-
langchain_nomic-0.1.1.dist-info/METADATA,sha256=dVlit1LLPiTaarhIEHGPmmKDoxp00Pad4Pjg6C3lg38,1290
|
6
|
-
langchain_nomic-0.1.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
7
|
-
langchain_nomic-0.1.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|