-
Notifications
You must be signed in to change notification settings - Fork 195
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
base: main
Are you sure you want to change the base?
Conversation
import json | ||
|
||
import nest_asyncio | ||
nest_asyncio.apply() |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
#2 Now, we have pg-vector support.