chatgpt-retrieval-plugin
chatgpt-retrieval-plugin copied to clipboard
postgres support
I'm trying to use the retrieval plugin using postgres (installed locally). I created the database, installed pgvector.
When I check - I can see that the migration script, by default is run on the postgres database! Shouldn't it be used on the database defined in the PG_DATABASE environment variable?
If I alter the command to run the script on the database I'd like to use, and then use the FastAPI to upsert a file, I get an error:
detail": "str(relation \"documents\" does not exist\nLINE 1: INSERT INTO documents (id, content, embedding, document_id, ...\n ^\n)"
Is there something else in the app hardcoded to use the postgres database?
I also tried to run from docker - but should the port be set to 5432? 54322? The docs use both...
Thanks for any clarity
not sure but it looks for env var
datastore/providers/postgres_datastore.py PG_DB = os.environ.get("PG_DB", "postgres")
not PG_DATABASE?
hope that helps