llama-index-vector-stores-postgres 0.2.0__tar.gz → 0.2.2__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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: llama-index-vector-stores-postgres
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: llama-index vector_stores postgres integration
5
5
  License: MIT
6
6
  Author: Your Name
@@ -138,7 +138,7 @@ class PGVectorStore(BasePydanticVectorStore):
138
138
  flat_metadata: bool = False
139
139
 
140
140
  connection_string: str
141
- async_connection_string: Union[str, sqlalchemy.engine.URL]
141
+ async_connection_string: str
142
142
  table_name: str
143
143
  schema_name: str
144
144
  embed_dim: int
@@ -203,22 +203,9 @@ class PGVectorStore(BasePydanticVectorStore):
203
203
 
204
204
  from sqlalchemy.orm import declarative_base
205
205
 
206
- # sqlalchemy model
207
- self._base = declarative_base()
208
- self._table_class = get_data_model(
209
- self._base,
210
- table_name,
211
- schema_name,
212
- hybrid_search,
213
- text_search_config,
214
- cache_ok,
215
- embed_dim=embed_dim,
216
- use_jsonb=use_jsonb,
217
- )
218
-
219
206
  super().__init__(
220
- connection_string=connection_string,
221
- async_connection_string=async_connection_string,
207
+ connection_string=str(connection_string),
208
+ async_connection_string=str(async_connection_string),
222
209
  table_name=table_name,
223
210
  schema_name=schema_name,
224
211
  hybrid_search=hybrid_search,
@@ -231,6 +218,19 @@ class PGVectorStore(BasePydanticVectorStore):
231
218
  hnsw_kwargs=hnsw_kwargs,
232
219
  )
233
220
 
221
+ # sqlalchemy model
222
+ self._base = declarative_base()
223
+ self._table_class = get_data_model(
224
+ self._base,
225
+ table_name,
226
+ schema_name,
227
+ hybrid_search,
228
+ text_search_config,
229
+ cache_ok,
230
+ embed_dim=embed_dim,
231
+ use_jsonb=use_jsonb,
232
+ )
233
+
234
234
  async def close(self) -> None:
235
235
  if not self._is_initialized:
236
236
  return
@@ -27,7 +27,7 @@ exclude = ["**/BUILD"]
27
27
  license = "MIT"
28
28
  name = "llama-index-vector-stores-postgres"
29
29
  readme = "README.md"
30
- version = "0.2.0"
30
+ version = "0.2.2"
31
31
 
32
32
  [tool.poetry.dependencies]
33
33
  python = ">=3.8.1,<4.0"