llama-index-vector-stores-chroma 0.1.9__tar.gz → 0.2.0__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-chroma might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: llama-index-vector-stores-chroma
3
- Version: 0.1.9
3
+ Version: 0.2.0
4
4
  Summary: llama-index vector_stores chroma integration
5
5
  License: MIT
6
6
  Author: Your Name
@@ -11,8 +11,9 @@ Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.9
12
12
  Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
14
15
  Requires-Dist: chromadb (>=0.4.0,<0.6.0)
15
- Requires-Dist: llama-index-core (>=0.10.1,<0.11.0)
16
+ Requires-Dist: llama-index-core (>=0.11.0,<0.12.0)
16
17
  Description-Content-Type: text/markdown
17
18
 
18
19
  # LlamaIndex Vector_Stores Integration: Chroma
@@ -164,13 +164,6 @@ class ChromaVectorStore(BasePydanticVectorStore):
164
164
  ) -> None:
165
165
  """Init params."""
166
166
  collection_kwargs = collection_kwargs or {}
167
- if chroma_collection is None:
168
- client = chromadb.HttpClient(host=host, port=port, ssl=ssl, headers=headers)
169
- self._collection = client.get_or_create_collection(
170
- name=collection_name, **collection_kwargs
171
- )
172
- else:
173
- self._collection = cast(Collection, chroma_collection)
174
167
 
175
168
  super().__init__(
176
169
  host=host,
@@ -181,6 +174,13 @@ class ChromaVectorStore(BasePydanticVectorStore):
181
174
  persist_dir=persist_dir,
182
175
  collection_kwargs=collection_kwargs or {},
183
176
  )
177
+ if chroma_collection is None:
178
+ client = chromadb.HttpClient(host=host, port=port, ssl=ssl, headers=headers)
179
+ self._collection = client.get_or_create_collection(
180
+ name=collection_name, **collection_kwargs
181
+ )
182
+ else:
183
+ self._collection = cast(Collection, chroma_collection)
184
184
 
185
185
  @classmethod
186
186
  def from_collection(cls, collection: Any) -> "ChromaVectorStore":
@@ -443,7 +443,7 @@ class ChromaVectorStore(BasePydanticVectorStore):
443
443
  results["ids"] = [[]]
444
444
 
445
445
  for node_id, text, metadata in zip(
446
- results["ids"][0], results["documents"], results["metadatas"]
446
+ results["ids"], results["documents"], results["metadatas"]
447
447
  ):
448
448
  try:
449
449
  node = metadata_dict_to_node(metadata)
@@ -27,12 +27,12 @@ exclude = ["**/BUILD"]
27
27
  license = "MIT"
28
28
  name = "llama-index-vector-stores-chroma"
29
29
  readme = "README.md"
30
- version = "0.1.9"
30
+ version = "0.2.0"
31
31
 
32
32
  [tool.poetry.dependencies]
33
33
  python = ">=3.8.1,<4.0"
34
- llama-index-core = "^0.10.1"
35
34
  chromadb = ">=0.4.0,<0.6.0"
35
+ llama-index-core = "^0.11.0"
36
36
 
37
37
  [tool.poetry.group.dev.dependencies]
38
38
  ipython = "8.10.0"