From 729e935ea47b35d9a3645f71024d83370ed0cef5 Mon Sep 17 00:00:00 2001 From: Juanma Tristancho <83718131+jmtristancho@users.noreply.github.com> Date: Fri, 19 May 2023 23:01:26 +0200 Subject: [PATCH] PGVector logger message level (#4920) # Change the logger message level The library is logging at `error` level a situation that is not an error. We noticed this error in our logs, but from our point of view it's an expected behavior and the log level should be `warning`. --- langchain/vectorstores/pgvector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langchain/vectorstores/pgvector.py b/langchain/vectorstores/pgvector.py index 81951f49..c042cc2f 100644 --- a/langchain/vectorstores/pgvector.py +++ b/langchain/vectorstores/pgvector.py @@ -184,7 +184,7 @@ class PGVector(VectorStore): with Session(self._conn) as session: collection = self.get_collection(session) if not collection: - self.logger.error("Collection not found") + self.logger.warning("Collection not found") return session.delete(collection) session.commit()