From 6ce9354ee4b2b77e1604a876edc8e14b52ab0880 Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Thu, 23 Jan 2025 15:27:39 +0100 Subject: [PATCH 1/3] fix: missing pgvector in CLI Fixes https://github.com/langchain-ai/langgraph/issues/3164 --- libs/cli/langgraph_cli/docker.py | 3 ++- libs/cli/tests/unit_tests/test_docker.py | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/cli/langgraph_cli/docker.py b/libs/cli/langgraph_cli/docker.py index 5d4c1cddd..1b8d542f7 100644 --- a/libs/cli/langgraph_cli/docker.py +++ b/libs/cli/langgraph_cli/docker.py @@ -170,13 +170,14 @@ def compose_as_dict( # Add Postgres service before langgraph-api if it is needed if include_db: services["langgraph-postgres"] = { - "image": "postgres:16", + "image": "pgvector/pgvector:pg16", "ports": ['"5433:5432"'], "environment": { "POSTGRES_DB": "postgres", "POSTGRES_USER": "postgres", "POSTGRES_PASSWORD": "postgres", }, + "command": ["postgres", "-c", "shared_preload_libraries=vector"], "volumes": ["langgraph-data:/var/lib/postgresql/data"], "healthcheck": { "test": "pg_isready -U postgres", diff --git a/libs/cli/tests/unit_tests/test_docker.py b/libs/cli/tests/unit_tests/test_docker.py index 781c049c1..355efeb4d 100644 --- a/libs/cli/tests/unit_tests/test_docker.py +++ b/libs/cli/tests/unit_tests/test_docker.py @@ -115,13 +115,17 @@ services: timeout: 1s retries: 5 langgraph-postgres: - image: postgres:16 + image: pgvector/pgvector:pg16 ports: - "5433:5432" environment: POSTGRES_DB: postgres POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres + command: + - postgres + - -c + - shared_preload_libraries=vector volumes: - langgraph-data:/var/lib/postgresql/data healthcheck: From 9d5166a0d3be19132bd6e30637032d559409dfda Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Sat, 25 Jan 2025 04:16:52 +0100 Subject: [PATCH 2/3] Fix tests --- libs/cli/tests/unit_tests/cli/test_cli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/cli/tests/unit_tests/cli/test_cli.py b/libs/cli/tests/unit_tests/cli/test_cli.py index 52e2b682f..3b0e0dae6 100644 --- a/libs/cli/tests/unit_tests/cli/test_cli.py +++ b/libs/cli/tests/unit_tests/cli/test_cli.py @@ -79,13 +79,17 @@ services: timeout: 1s retries: 5 langgraph-postgres: - image: postgres:16 + image: pgvector/pgvector:pg16 ports: - "5433:5432" environment: POSTGRES_DB: postgres POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres + command: + - postgres + - -c + - shared_preload_libraries=vector volumes: - langgraph-data:/var/lib/postgresql/data healthcheck: From 4b5b30915257ef5d999f78566b415c8638ab5894 Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Sat, 25 Jan 2025 04:18:18 +0100 Subject: [PATCH 3/3] Bump to 0.1.69 --- libs/cli/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/cli/pyproject.toml b/libs/cli/pyproject.toml index bcb314066..d9f26b493 100644 --- a/libs/cli/pyproject.toml +++ b/libs/cli/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langgraph-cli" -version = "0.1.68" +version = "0.1.69" description = "CLI for interacting with LangGraph API" authors = [] license = "MIT"