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

pg-vector support based on Asyncpg #41

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

Dorbmon
Copy link

@Dorbmon Dorbmon commented Sep 15, 2024

#2 Now, we have pg-vector support.

@gusye1234
Copy link
Owner

Hi, maybe add an example for pg vector storage? Something like this or a simple benchmark test like this.

@Dorbmon
Copy link
Author

Dorbmon commented Sep 17, 2024

Hi, maybe add an example for pg vector storage? Something like this or a simple benchmark test like this.

Done

import json

import nest_asyncio
nest_asyncio.apply()
Copy link
Owner

Choose a reason for hiding this comment

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

Why use nest_asyncio here? We have nest_asyncio at beginning then remove it. It seems like will cause some deadlock cases

Copy link
Author

Choose a reason for hiding this comment

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

The reason is that we seem to lack an asynchronous initialization function. The entire function runs in an asynchronous environment, and in order to run in a nested asynchronous environment, I used nest_asyncio.

Copy link
Owner

Choose a reason for hiding this comment

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

Yeah... it could be problematic I think. Do we have to use nest-async to run pg-vector storage?

Copy link
Author

Choose a reason for hiding this comment

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

I need to ensure that the plugin is created correctly, along with the corresponding table. Since the asyncpg library only supports asynchronous operations, I need to obtain a loop for initialization.

@gusye1234 gusye1234 added vectorDB enhancement New feature or request labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vectorDB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants