Revert "feat(knowledgebase): replace litellm-pgvector connector with memory-retrieval"
This reverts commitabeadc49c8. Restores vendor/litellm-pgvector/ and the vector_store_registry wiring (in-band file_search tool-call support) at the user's request, after re-confirming against docs.litellm.ai/docs/completion/knowledgebase and litellm-pgvector's own README that pg_vector is still not an in-process vector_store_registry backend -- it requires this same standalone connector service either way, so there is no simpler 'native' path that was missed. Trading back in: 793 lines of vendored code, the untested Prisma migration, and the git-context build risk noted in VENDORED.md (all flagged as unverified against real hardware in issue #24), in exchange for the file_search in-band tool call memory-retrieval did not support. Conflicts resolved on top of later commits (Redis, update.sh key-minting fold-in): - .env.example / docs/memory-knowledgebase.md: kept the auto-mint-via- update.sh language, renamed MEMORY_RETRIEVAL_* back to LITELLM_PGVECTOR_*. - scripts/generate-secrets.sh: left deleted -- its job was folded into update.sh in24d749b, unrelated to this revert. - scripts/update.sh: renamed the MEMORY_RETRIEVAL_* secret/mint calls to LITELLM_PGVECTOR_* to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WHfjWrSEcGhCoeu6dQfDa
This commit is contained in:
+25
-17
@@ -238,30 +238,38 @@ services:
|
||||
retries: 10
|
||||
|
||||
# LiteLLM's native knowledgebase/vector-store feature has no Qdrant backend
|
||||
# (the qdrant service above only serves Open WebUI's own RAG/Memory), so
|
||||
# this small in-repo service wraps langchain_postgres.PGVector directly
|
||||
# against pgvector-db instead — simpler than a vendored third-party
|
||||
# connector (see docs/research/langchain-pgvector-vs-litellm-pgvector.md,
|
||||
# which replaced the earlier litellm-pgvector approach). It still calls
|
||||
# back into litellm for embeddings, same gateway boundary as everything
|
||||
# else in this stack.
|
||||
memory-retrieval:
|
||||
# (the qdrant service above only serves Open WebUI's own RAG/Memory) — this
|
||||
# companion service (github.com/BerriAI/litellm-pgvector) is the only
|
||||
# self-hosted path. No published image exists yet, so this builds from a
|
||||
# vendored copy in vendor/litellm-pgvector/ (see that dir's README) rather
|
||||
# than a remote git build context — the server's Docker/BuildKit couldn't
|
||||
# do an authenticated-looking clone of a public github.com repo (fails
|
||||
# with "could not read Username ... terminal prompts disabled"), and
|
||||
# vendoring sidesteps needing that debugged. See
|
||||
# docs/research/litellm-knowledgebase.md.
|
||||
# ponytail: unverified against real hardware — Prisma migration behavior on
|
||||
# first boot and the exact vector_store_registry field names for the
|
||||
# pg_vector provider need a live smoke test. See issue #24.
|
||||
litellm-pgvector:
|
||||
build:
|
||||
context: ./services/memory-retrieval
|
||||
container_name: memory-retrieval
|
||||
context: ./vendor/litellm-pgvector
|
||||
container_name: litellm-pgvector
|
||||
depends_on:
|
||||
pgvector-db:
|
||||
condition: service_healthy
|
||||
litellm:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- DATABASE_URL=postgresql+psycopg://litellm_pgvector:${PGVECTOR_DB_PASSWORD}@pgvector-db:5432/litellm_pgvector
|
||||
- LITELLM_BASE_URL=http://litellm:4000/v1
|
||||
# A virtual key for this workload — see docs/proxy-key-onboarding.md.
|
||||
- LITELLM_API_KEY=${MEMORY_RETRIEVAL_EMBEDDING_KEY}
|
||||
- EMBEDDING_MODEL=local-embedding
|
||||
- SERVER_API_KEY=${MEMORY_RETRIEVAL_API_KEY}
|
||||
- COLLECTION_NAME=memory-and-notes
|
||||
- DATABASE_URL=postgresql://litellm_pgvector:${PGVECTOR_DB_PASSWORD}@pgvector-db:5432/litellm_pgvector
|
||||
- SERVER_API_KEY=${LITELLM_PGVECTOR_API_KEY}
|
||||
# Calls back into litellm for embeddings, same pattern as any other
|
||||
# workload — see docs/proxy-key-onboarding.md for issuing this key.
|
||||
- EMBEDDING__MODEL=local-embedding
|
||||
- EMBEDDING__BASE_URL=http://litellm:4000
|
||||
- EMBEDDING__API_KEY=${LITELLM_PGVECTOR_EMBEDDING_KEY}
|
||||
- EMBEDDING__DIMENSIONS=768
|
||||
expose:
|
||||
- "8000"
|
||||
restart: unless-stopped
|
||||
networks: [ai-stack]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user