Merge pull request #13232

* PGVector needs to close its connection if its garbage collected
pull/13417/head
Sumukh Sridhara 10 months ago committed by GitHub
parent 85a77d2c27
commit 1726d5dcdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -147,6 +147,10 @@ class PGVector(VectorStore):
self.create_tables_if_not_exists()
self.create_collection()
def __del__(self) -> None:
if self._conn:
self._conn.close()
@property
def embeddings(self) -> Embeddings:
return self.embedding_function

Loading…
Cancel
Save