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

ai pgvector #560

Closed
wants to merge 4 commits into from
Closed

ai pgvector #560

wants to merge 4 commits into from

Conversation

speed2exe
Copy link
Collaborator

  • added pg for appflowy ai to all docker-compose.ymland env files

@@ -0,0 +1,2 @@
-- Create the 'vector' extension within the database that is set in the docker-compose.yml
CREATE EXTENSION IF NOT EXISTS vector;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this migration only need to run on appflowy-ai postgres DB?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes i believe so.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But how to run migration for appflowy-ai postgres? IIRC, Migrations under migrations folder only work for appflowy-cloud postgres database.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think there's no migration required. appflowy ai will only need a pg db with extension install. @Horusiath correct me if I'm wrong

Copy link
Collaborator

@Horusiath Horusiath May 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Appflowy-AI uses LangChain, that framework itself tries to initialize vector extension by default, along with the necessary tables. So this migration should not be necessary.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think there's no migration required. appflowy ai will only need a pg db with extension install. @Horusiath correct me if I'm wrong

try https://hub.docker.com/r/tensorchord/pgvecto-rs , there is no need to build postgresql image with extension again, or you can build image and upload to docker hub (since not everyone has enough space and time to run the build).

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

Successfully merging this pull request may close these issues.

4 participants