feat(knowledgebase): replace litellm-pgvector connector with memory-retrieval
Per docs/research/langchain-pgvector-vs-litellm-pgvector.md (issue #25): the vendored litellm-pgvector connector (793 lines, Prisma migrations, a fragile git-context build) is replaced by a ~90-line FastAPI service (services/memory-retrieval/) wrapping langchain_postgres.PGVector directly against pgvector-db. Same gateway boundary — it still calls litellm for embeddings, nothing talks to Postgres or the model directly except this service. - New services/memory-retrieval/ (main.py, Dockerfile, requirements.txt): POST /ingest, POST /query, GET /health. - docker-compose.yml: litellm-pgvector service replaced by memory-retrieval; pgvector-db and embedding-server untouched. - litellm-config.yaml: vector_store_registry block removed (no langchain_postgres provider exists to register against; callers query memory-retrieval directly instead of an in-band file_search tool call — that mechanism was never confirmed working per issue #24 anyway). - scripts/ingest-memory.sh rewritten for the new /ingest endpoint (same per-line chunking, no dedup). - .env vars renamed: LITELLM_PGVECTOR_API_KEY/LITELLM_PGVECTOR_EMBEDDING_KEY -> MEMORY_RETRIEVAL_API_KEY/MEMORY_RETRIEVAL_EMBEDDING_KEY. - vendor/litellm-pgvector/ removed entirely. - docs/memory-knowledgebase.md updated for the new setup/query flow. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+6
-6
@@ -43,12 +43,12 @@ LITELLM_DB_PASSWORD=
|
||||
UI_USERNAME=admin
|
||||
UI_PASSWORD=
|
||||
|
||||
# --- Knowledgebase (pgvector, see docs/memory-knowledgebase.md) ---
|
||||
# --- Knowledgebase (pgvector + memory-retrieval, see docs/memory-knowledgebase.md) ---
|
||||
# Required — random values, e.g. `openssl rand -hex 32`.
|
||||
PGVECTOR_DB_PASSWORD=
|
||||
# Auth key litellm-pgvector requires on its own API (its SERVER_API_KEY).
|
||||
LITELLM_PGVECTOR_API_KEY=
|
||||
# A virtual key litellm-pgvector uses to call back into litellm for
|
||||
# Auth key memory-retrieval requires on its own API (its SERVER_API_KEY).
|
||||
MEMORY_RETRIEVAL_API_KEY=
|
||||
# A virtual key memory-retrieval uses to call back into litellm for
|
||||
# embeddings — create it in the Admin UI like any other workload key
|
||||
# (see docs/proxy-key-onboarding.md), name it "litellm-pgvector".
|
||||
LITELLM_PGVECTOR_EMBEDDING_KEY=
|
||||
# (see docs/proxy-key-onboarding.md), name it "memory-retrieval".
|
||||
MEMORY_RETRIEVAL_EMBEDDING_KEY=
|
||||
|
||||
Reference in New Issue
Block a user