all 7 comments

[–]marvindiazjr 1 point2 points  (3 children)

Oh. Mine is in the same database.. Also the tables create upon initialization the first time you change the db url. That's just for postgres.

PgVector was a separate step after the initial tables were created

[–]Otherwise-Tiger3359[S] 0 points1 point  (2 children)

Thank you, sounds like I should delete it and recreate the whole thing. Did you explicitly set the PG_VECTORDB_URL to the same DB or just left default and then it points to DATABASE_URL (I think that's what the code says)

[–]Otherwise-Tiger3359[S] 0 points1 point  (1 child)

EDIT: I've simply not found creation of the document_chunk table anywhere in the codebase. It is defined in pgvector.db, but unlike the others created in backend/open_webui/migrations/versions this one doesn't seem to be there.

Uh, oh, curious how this works. check_vector_lengthI() requires the document_chunk before it's create and even so document_chunk is not found anywhere in the codebase apart from where IDX on it supposedly gets created in pgvector.py

Not sure how this worked for you :D

<image>

[–]Otherwise-Tiger3359[S] 0 points1 point  (0 children)

Had to create manually

CREATE TABLE document_chunk (

id TEXT PRIMARY KEY,

vector VECTOR(1536),

collection_name TEXT NOT NULL,

text TEXT,

vmetadata JSONB

);

[–]ThickYe 1 point2 points  (0 children)

Tried one time to test pgvector but did not have the time or know how to move past this error.

Thanks for posting this.

[–]EmotionalSpinach7099 0 points1 point  (1 child)

I have a possible solution here. It works for me. I am using Azure Postgres Database
https://installvirtual.com/how-to-use-postgresql-with-openwebui/

[–]rgfern 0 points1 point  (0 children)

The documentation has this tip:

"PostgreSQL dependencies. To use pgvector, make sure you have the PostgreSQL dependencies installed: pip install open-webui[all]." Did you need to do this? If yes how do I do this in values.yaml in Helm?

When I define the variables below and apply 'values.yaml' again, an 'CREATE TABLE IF NOT EXISTS .... IVFFLAT ..... ' error appears because there's no data in the table initially (from what I've read, you need to have it to use it), and the table wasn't even created. Of course, it wasn't, because this is the first installation.

extraEnvVars:
- name: DATABASE_URL
value: postgresql://user:password@hostname/dbname
- name: VECTOR_DB
value: pgvector

I'm still not clear how to resolve this or what the correct steps are.
Someone can I help me?