vector-admin icon indicating copy to clipboard operation
vector-admin copied to clipboard

[BUG]: chroma/sync error

Open jagchat opened this issue 11 months ago • 6 comments

How are you running VectorAdmin?

Docker (local)

What happened?

I am unable to view ChromaDb content through VectorAdmin. I push data to ChromaDb using Python. My ChromaDb queries, from python, work fine. However, I am not able to view any of ChromaDb entries in VectorAdmin.

Are there known steps to reproduce?

Both ChromaDb and VectorAdmin are running as docker containers. My docker compose:

version: "3.7"
services:
  chroma-db:
    image: chromadb/chroma:0.6.3
    container_name: demo-chroma-server
    ports:
      - "9000:8000"
    #http://localhost:9000/api/v1/heartbeat

  vector-admin:
    container_name: demo-vector-admin
    image: 3x3cut0r/vector-admin:latest
    restart: unless-stopped
    ports:
      - "2138:3001"
      - "3355:3355"
      - "8288:8288"
    environment: # https://github.com/Mintplex-Labs/vector-admin/blob/master/docker/.env.example
      SERVER_PORT: 3001
      DATABASE_CONNECTION_STRING: "postgresql://vectoradmin:password@postgres:5432/vectoradmin"
      JWT_SECRET: "random-string-goes-here"
      INNGEST_EVENT_KEY: "background_workers"
      INNGEST_SIGNING_KEY: "random-string-goes-here"
      INNGEST_LANDING_PAGE: "true"
    volumes:
      #   - "./.env:/app/backend/.env"
      - vector-admin-data:/app/backend/storage
      - vector-admin-hotdir:/app/document-processor/hotdir
    depends_on:
      - postgres

  # https://hub.docker.com/_/postgres
  postgres:
    container_name: demo-vector-admin-postgres
    image: postgres:16-alpine
    restart: always
    # ports:
    #   - 5432:5432
    volumes:
      - vector-admin-postgres:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: "vectoradmin"
      POSTGRES_PASSWORD: "password"
      POSTGRES_DB: "vectoradmin"
volumes:
  vector-admin-postgres:
    name: demo-vector-admin-postgres
  vector-admin-data:
    name: demo-vector-admin-data
  vector-admin-hotdir:
    name: demo-vector-admin-hotdir

I used following basic Python script:

from langchain_community.vectorstores import Chroma
from langchain.embeddings.openai import OpenAIEmbeddings
from chromadb.config import Settings
from chromadb import HttpClient 
import os

# Set your OpenAI API key (important!)
os.environ["OPENAI_API_KEY"] = "-----"  # Replace with your actual key

embeddings = OpenAIEmbeddings()

vector_store = Chroma(
    collection_name="emp_collection",
    embedding_function=embeddings,
    client=HttpClient(host='localhost', port=9000) #Chroma service running externally (docker container)
)

from langchain.docstore.document import Document
test_doc = Document(page_content="Test document", metadata={"test_key": "test_value"})
test_id = "test_id_1" # Test ID
vector_store.add_documents(documents=[test_doc], ids=[test_id])

The above code pushes data to ChromaDb. However, I am not able to view that information in VectorAdmin. If I click sync, I get following job response:

{
  "canRetry": true,
  "message": "Job failed with error",
  "details": {}
}

jagchat avatar Feb 17 '25 17:02 jagchat

Hi,

I think I'm facing the same issue. I suspect an incompatibility with chroma 0.6.3 since for me it was working well along Chroma 0.5.3.

ghuserlb avatar Feb 18 '25 08:02 ghuserlb

You are right. Looks like it is a bug. I switched to 0.5.3 and it is working fine. Thanks!

jagchat avatar Feb 20 '25 01:02 jagchat

same issue here.

rossm-mf avatar Feb 28 '25 14:02 rossm-mf

Same here, unfortunately there is no other image but the latest tag. So I can not go back to a working version

n-kostadinov avatar Mar 10 '25 19:03 n-kostadinov

experiencing the same issue here

augustolima avatar May 19 '25 18:05 augustolima

I think its an API issue. Theyre still using the v1 api, while the current chromadb is on v2, and they depreciated v1. droping the chroma version to one that uses v1 API works.

InvectedGaming avatar Jun 25 '25 02:06 InvectedGaming