Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUntimeError register_vector: unknown type: pg_catalog.vector #89

Open
chimezie opened this issue Nov 13, 2024 · 1 comment
Open

RUntimeError register_vector: unknown type: pg_catalog.vector #89

chimezie opened this issue Nov 13, 2024 · 1 comment

Comments

@chimezie
Copy link
Contributor

Using the latest Ogbujipt from Git, pgvector version 0.3.6 installed, and while initializing a DocDB instance via DocDB.from_conn_params with the following:

    db = await DocDB.from_conn_params(
        embedding_model=SentenceTransformer('all-MiniLM-L12-v2'),
        table_name='.. table name ..',
        user=os.environ['DATABASE_USERNAME'],
        password=os.environ['DATABASE_PASSWORD'],
        db_name=os.environ['DATABASE_NAME'],
        host=os.environ['DATABASE_HOST'],
        port=int(os.environ['DATABASE_PORT'])
    )

I get:

  File "/path/to/site-packages/asyncpg/pool.py", line 512, in _get_new_connection
    await self._init(con)
  File "/path/to/site-packages/ogbujipt/embedding/pgvector.py", line 211, in init_pool
    raise RuntimeError(f'Unable to find vector type in the DB/schema. You might need to enable it: {e}')
RuntimeError: Unable to find vector type in the DB/schema. You might need to enable it: unknown type: pg_catalog.vector
@uogbuji
Copy link
Collaborator

uogbuji commented Nov 14, 2024

Huh. Weird. DocDB is no longer a thing. We removed it a couple of major releases ago because you can achieve the same thing with DataDB, via metadata. I would have expected an error on import. Could you try on a clean venv, to help get a clearer picture of what's going on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants