From dffa3a8b8404841e9556cda8051daa6345858134 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Wed, 5 Feb 2025 20:58:45 +0100 Subject: [PATCH] Update to langchain-postgres 0.0.13 --- CHANGES.md | 1 + langchain_cratedb/vectorstores/main.py | 3 +++ pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index fd171f2..676197a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ ## Unreleased +- Updated to langchain-postgres 0.0.13 ## v0.1.0 - 2025-01-03 - Added implementation and software tests for `CrateDBCache`, diff --git a/langchain_cratedb/vectorstores/main.py b/langchain_cratedb/vectorstores/main.py index fa3ed3c..e00be47 100644 --- a/langchain_cratedb/vectorstores/main.py +++ b/langchain_cratedb/vectorstores/main.py @@ -541,6 +541,9 @@ def _query_collection_multi( _type = self.EmbeddingStore + # With NumPy 2, list contains `np.float64` values. + embedding = list(map(float, embedding)) + results: List[Any] = ( session.query( self.EmbeddingStore, diff --git a/pyproject.toml b/pyproject.toml index 0164ed5..e5f372b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,7 +92,7 @@ pretty = true python = ">=3.9,<4.0" langchain-community = "<0.4" langchain-core = "<0.4" -langchain-postgres = "==0.0.12" +langchain-postgres = "==0.0.13" sqlalchemy-cratedb = ">=0.40.1" [tool.ruff.lint]