llama-index-vector-stores-opensearch 0.5.1__tar.gz → 0.5.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.

Potentially problematic release.


This version of llama-index-vector-stores-opensearch might be problematic. Click here for more details.

@@ -0,0 +1,153 @@
1
+ llama_index/_static
2
+ .DS_Store
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ *.py[cod]
6
+ *$py.class
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ bin/
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ etc/
21
+ include/
22
+ lib/
23
+ lib64/
24
+ parts/
25
+ sdist/
26
+ share/
27
+ var/
28
+ wheels/
29
+ pip-wheel-metadata/
30
+ share/python-wheels/
31
+ *.egg-info/
32
+ .installed.cfg
33
+ *.egg
34
+ MANIFEST
35
+
36
+ # PyInstaller
37
+ # Usually these files are written by a python script from a template
38
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
39
+ *.manifest
40
+ *.spec
41
+
42
+ # Installer logs
43
+ pip-log.txt
44
+ pip-delete-this-directory.txt
45
+
46
+ # Unit test / coverage reports
47
+ htmlcov/
48
+ .tox/
49
+ .nox/
50
+ .coverage
51
+ .coverage.*
52
+ .cache
53
+ nosetests.xml
54
+ coverage.xml
55
+ *.cover
56
+ *.py,cover
57
+ .hypothesis/
58
+ .pytest_cache/
59
+ .ruff_cache
60
+
61
+ # Translations
62
+ *.mo
63
+ *.pot
64
+
65
+ # Django stuff:
66
+ *.log
67
+ local_settings.py
68
+ db.sqlite3
69
+ db.sqlite3-journal
70
+
71
+ # Flask stuff:
72
+ instance/
73
+ .webassets-cache
74
+
75
+ # Scrapy stuff:
76
+ .scrapy
77
+
78
+ # Sphinx documentation
79
+ docs/_build/
80
+
81
+ # PyBuilder
82
+ target/
83
+
84
+ # Jupyter Notebook
85
+ .ipynb_checkpoints
86
+ notebooks/
87
+
88
+ # IPython
89
+ profile_default/
90
+ ipython_config.py
91
+
92
+ # pyenv
93
+ .python-version
94
+
95
+ # pipenv
96
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
97
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
98
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
99
+ # install all needed dependencies.
100
+ #Pipfile.lock
101
+
102
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
103
+ __pypackages__/
104
+
105
+ # Celery stuff
106
+ celerybeat-schedule
107
+ celerybeat.pid
108
+
109
+ # SageMath parsed files
110
+ *.sage.py
111
+
112
+ # Environments
113
+ .env
114
+ .venv
115
+ env/
116
+ venv/
117
+ ENV/
118
+ env.bak/
119
+ venv.bak/
120
+ pyvenv.cfg
121
+
122
+ # Spyder project settings
123
+ .spyderproject
124
+ .spyproject
125
+
126
+ # Rope project settings
127
+ .ropeproject
128
+
129
+ # mkdocs documentation
130
+ /site
131
+
132
+ # mypy
133
+ .mypy_cache/
134
+ .dmypy.json
135
+ dmypy.json
136
+
137
+ # Pyre type checker
138
+ .pyre/
139
+
140
+ # Jetbrains
141
+ .idea
142
+ modules/
143
+ *.swp
144
+
145
+ # VsCode
146
+ .vscode
147
+
148
+ # pipenv
149
+ Pipfile
150
+ Pipfile.lock
151
+
152
+ # pyright
153
+ pyrightconfig.json
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) Jerry Liu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,13 @@
1
+ Metadata-Version: 2.4
2
+ Name: llama-index-vector-stores-opensearch
3
+ Version: 0.5.3
4
+ Summary: llama-index vector_stores opensearch integration
5
+ Author-email: Your Name <you@example.com>
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Requires-Python: <4.0,>=3.9
9
+ Requires-Dist: llama-index-core<0.13,>=0.12.0
10
+ Requires-Dist: opensearch-py[async]<3,>=2.4.2
11
+ Description-Content-Type: text/markdown
12
+
13
+ # LlamaIndex Vector_Stores Integration: Opensearch
@@ -138,10 +138,18 @@ class OpensearchVectorClient:
138
138
  index=self._index, body=idx_conf
139
139
  )
140
140
  )
141
- asyncio_run(self._os_async_client.indices.refresh(index=self._index))
141
+ if self.is_aoss:
142
+ asyncio_run(self._os_async_client.indices.exists(index=self._index))
143
+ else:
144
+ asyncio_run(
145
+ self._os_async_client.indices.refresh(index=self._index)
146
+ )
142
147
  except not_found_error:
143
148
  self._os_client.indices.create(index=self._index, body=idx_conf)
144
- self._os_client.indices.refresh(index=self._index)
149
+ if self.is_aoss:
150
+ self._os_client.indices.exists(index=self._index)
151
+ else:
152
+ self._os_client.indices.refresh(index=self._index)
145
153
 
146
154
  def _import_opensearch(self) -> Any:
147
155
  """Import OpenSearch if available, otherwise raise error."""
@@ -634,7 +642,7 @@ class OpensearchVectorClient:
634
642
  ef_enabled = False
635
643
  else:
636
644
  self._os_version = self._get_opensearch_version()
637
- major, minor, patch = self.os_version.split(".")
645
+ major, minor, patch = self._os_version.split(".")
638
646
  ef_enabled = int(major) >= 2 and int(minor) >= 9
639
647
  return ef_enabled
640
648
 
@@ -0,0 +1,64 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [dependency-groups]
6
+ dev = [
7
+ "ipython==8.10.0",
8
+ "jupyter>=1.0.0,<2",
9
+ "mypy==0.991",
10
+ "pre-commit==3.2.0",
11
+ "pylint==2.15.10",
12
+ "pytest==7.2.1",
13
+ "pytest-asyncio==0.21.0",
14
+ "pytest-mock==3.11.1",
15
+ "ruff==0.0.292",
16
+ "tree-sitter-languages>=1.8.0,<2",
17
+ "types-Deprecated>=0.1.0",
18
+ "types-PyYAML>=6.0.12.12,<7",
19
+ "types-protobuf>=4.24.0.4,<5",
20
+ "types-redis==4.5.5.0",
21
+ "types-requests==2.28.11.8",
22
+ "types-setuptools==67.1.0.0",
23
+ "black[jupyter]<=23.9.1,>=23.7.0",
24
+ "codespell[toml]>=v2.2.6",
25
+ ]
26
+
27
+ [project]
28
+ name = "llama-index-vector-stores-opensearch"
29
+ version = "0.5.3"
30
+ description = "llama-index vector_stores opensearch integration"
31
+ authors = [{name = "Your Name", email = "you@example.com"}]
32
+ requires-python = ">=3.9,<4.0"
33
+ readme = "README.md"
34
+ license = "MIT"
35
+ dependencies = [
36
+ "llama-index-core>=0.12.0,<0.13",
37
+ "opensearch-py[async]>=2.4.2,<3",
38
+ ]
39
+
40
+ [tool.codespell]
41
+ check-filenames = true
42
+ check-hidden = true
43
+ skip = "*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb"
44
+
45
+ [tool.hatch.build.targets.sdist]
46
+ include = ["llama_index/"]
47
+ exclude = ["**/BUILD"]
48
+
49
+ [tool.hatch.build.targets.wheel]
50
+ include = ["llama_index/"]
51
+ exclude = ["**/BUILD"]
52
+
53
+ [tool.llamahub]
54
+ contains_example = false
55
+ import_path = "llama_index.vector_stores.opensearch"
56
+
57
+ [tool.llamahub.class_authors]
58
+ OpensearchVectorStore = "llama-index"
59
+
60
+ [tool.mypy]
61
+ disallow_untyped_defs = true
62
+ exclude = ["_static", "build", "examples", "notebooks", "venv"]
63
+ ignore_missing_imports = true
64
+ python_version = "3.8"
@@ -1,20 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: llama-index-vector-stores-opensearch
3
- Version: 0.5.1
4
- Summary: llama-index vector_stores opensearch integration
5
- License: MIT
6
- Author: Your Name
7
- Author-email: you@example.com
8
- Requires-Python: >=3.9,<4.0
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.9
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
- Requires-Dist: llama-index-core (>=0.12.0,<0.13.0)
16
- Requires-Dist: opensearch-py[async] (>=2.4.2,<3.0.0)
17
- Description-Content-Type: text/markdown
18
-
19
- # LlamaIndex Vector_Stores Integration: Opensearch
20
-
@@ -1,66 +0,0 @@
1
- [build-system]
2
- build-backend = "poetry.core.masonry.api"
3
- requires = ["poetry-core"]
4
-
5
- [tool.codespell]
6
- check-filenames = true
7
- check-hidden = true
8
- skip = "*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb"
9
-
10
- [tool.llamahub]
11
- contains_example = false
12
- import_path = "llama_index.vector_stores.opensearch"
13
-
14
- [tool.llamahub.class_authors]
15
- OpensearchVectorStore = "llama-index"
16
-
17
- [tool.mypy]
18
- disallow_untyped_defs = true
19
- exclude = ["_static", "build", "examples", "notebooks", "venv"]
20
- ignore_missing_imports = true
21
- python_version = "3.8"
22
-
23
- [tool.poetry]
24
- authors = ["Your Name <you@example.com>"]
25
- description = "llama-index vector_stores opensearch integration"
26
- exclude = ["**/BUILD"]
27
- license = "MIT"
28
- name = "llama-index-vector-stores-opensearch"
29
- readme = "README.md"
30
- version = "0.5.1"
31
-
32
- [tool.poetry.dependencies]
33
- python = ">=3.9,<4.0"
34
- llama-index-core = "^0.12.0"
35
-
36
- [tool.poetry.dependencies.opensearch-py]
37
- extras = ["async"]
38
- version = "^2.4.2"
39
-
40
- [tool.poetry.group.dev.dependencies]
41
- ipython = "8.10.0"
42
- jupyter = "^1.0.0"
43
- mypy = "0.991"
44
- pre-commit = "3.2.0"
45
- pylint = "2.15.10"
46
- pytest = "7.2.1"
47
- pytest-mock = "3.11.1"
48
- ruff = "0.0.292"
49
- tree-sitter-languages = "^1.8.0"
50
- types-Deprecated = ">=0.1.0"
51
- types-PyYAML = "^6.0.12.12"
52
- types-protobuf = "^4.24.0.4"
53
- types-redis = "4.5.5.0"
54
- types-requests = "2.28.11.8"
55
- types-setuptools = "67.1.0.0"
56
-
57
- [tool.poetry.group.dev.dependencies.black]
58
- extras = ["jupyter"]
59
- version = "<=23.9.1,>=23.7.0"
60
-
61
- [tool.poetry.group.dev.dependencies.codespell]
62
- extras = ["toml"]
63
- version = ">=v2.2.6"
64
-
65
- [[tool.poetry.packages]]
66
- include = "llama_index/"