langchain-nomic 0.1.1__tar.gz → 0.1.3__tar.gz

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.
@@ -1,19 +1,21 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langchain-nomic
3
- Version: 0.1.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.8.1,<4.0
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.1.46,<0.3)
15
- Requires-Dist: nomic (>=3.0.29,<4.0.0)
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
 
@@ -1,5 +1,3 @@
1
1
  from langchain_nomic.embeddings import NomicEmbeddings
2
2
 
3
- __all__ = [
4
- "NomicEmbeddings",
5
- ]
3
+ __all__ = ["NomicEmbeddings"]
@@ -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,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "langchain-nomic"
3
- version = "0.1.1"
3
+ version = "0.1.3"
4
4
  description = "An integration package connecting Nomic and LangChain"
5
5
  authors = []
6
6
  readme = "README.md"
@@ -9,11 +9,13 @@ license = "MIT"
9
9
 
10
10
  [tool.poetry.urls]
11
11
  "Source Code" = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/nomic"
12
+ "Release Notes" = "https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain-nomic%3D%3D0%22&expanded=true"
12
13
 
13
14
  [tool.poetry.dependencies]
14
- python = ">=3.8.1,<4.0"
15
- langchain-core = ">=0.1.46,<0.3"
16
- nomic = "^3.0.29"
15
+ python = ">=3.9,<4.0"
16
+ langchain-core = ">=0.2.40,<0.4"
17
+ nomic = "^3.1.2"
18
+ pillow = "^10.3.0"
17
19
 
18
20
  [tool.poetry.group.test]
19
21
  optional = true
@@ -27,6 +29,14 @@ pytest-watcher = "^0.3.4"
27
29
  pytest-asyncio = "^0.21.1"
28
30
  langchain-core = { path = "../../core", develop = true }
29
31
 
32
+ [[tool.poetry.group.test.dependencies.numpy]]
33
+ version = "^1.24.0"
34
+ python = "<3.12"
35
+
36
+ [[tool.poetry.group.test.dependencies.numpy]]
37
+ version = "^1.26.0"
38
+ python = ">=3.12"
39
+
30
40
  [tool.poetry.group.codespell]
31
41
  optional = true
32
42
 
File without changes