SciPhi-AI/R2R

r2r.providers.database.vecs.exc.MismatchedDimension

Closed this issue · 1 comments

Describe the bug
While installing the r2r using manual docker, getting following error
r2r.providers.database.vecs.exc.MismatchedDimension: Mismatch in the reported dimensions of the selected vector collection and embedding model. Correct the selected embedding model or specify a new vector collection by modifying the POSTGRES_VECS_COLLECTION environment variable.

To Reproduce
Steps to reproduce the behavior:

  1. create conda environment - python 3.10
  2. pip install r2r
  3. git clone https://github.com/SciPhi-AI/R2R.git
    cd R2R
  4. cp .env.example .env and set the OPENAI KEY
  5. pip install .
  6. docker-compose up -d
    then getting following error in emrgntcmplxty/r2r:main
    r2r.providers.database.vecs.exc.MismatchedDimension: Mismatch in the reported dimensions of the selected vector collection and embedding model. Correct the selected embedding model or specify a new vector collection by modifying the POSTGRES_VECS_COLLECTION environment variable.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Ubuntu
    Screenshot from 2024-07-22 20-59-53
    : [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

The issue is due to the missing environment variable POSTGRES_VECS_COLLECTION.
To make it work , I have to correct it like below in the compose.yaml file, because the original one was adding additional } with the collection name
POSTGRES_VECS_COLLECTION=${POSTGRES_VECS_COLLECTION:-}