qdrant-client
qdrant-client copied to clipboard
chore: Added init_options property
All Submissions:
- [x] Contributions should target the
devbranch. Did you create your branch fromdev? - [x] Have you followed the guidelines in our Contributing document?
- [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
New Feature Submissions:
- [x] Does your submission pass tests?
- [x] Have you installed
pre-commitwithpip3 install pre-commitand set up hooks withpre-commit install?
Why?
This change will be helpful in our integration implementations as we won't have to necessitate users to pass instances of both QdrantClient and AsyncQdrantClient. Either one will suffice.
Deploy Preview for poetic-froyo-8baba7 ready!
| Name | Link |
|---|---|
| Latest commit | f643483ca4c7236292ce789108dbb9029ad190ea |
| Latest deploy log | https://app.netlify.com/sites/poetic-froyo-8baba7/deploys/6683f76e62908c00085430d9 |
| Deploy Preview | https://deploy-preview-541--poetic-froyo-8baba7.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Hey @Anush008
It does not sound like the right motivation
Could you please provide more details and explain the need?
@joein, yes. For instances like these.
https://discord.com/channels/907569970500743200/1206597766999056435/1206601751747371089
Some frameworks require us to pass SDK instances and not the params to construct those. So instead of forcing users to pass 2 instances(sync, async) of essentially the same thing, we can construct one from the other.
Could you please explain why do they need to create two instances?
To implement the sync and async interfaces of the frameworks.
Like Langchain for example, has equivalent sync and async methods that've been implemented.
https://python.langchain.com/docs/modules/data_connection/vectorstores/#asynchronous-operations
So can they just use one client or another one? Why do they need to use both simultaneously?
What is the use case for having two clients at the same time?
For example, the Qdrant class from Langchain has both sync and async interfaces.
So for
Qdrant#add_documents(...)
...
await Qdrant#asimiliarity_search(...)
...
await Qdrant#aadd_documents(...)
...
Qdrant#similiarity_search(...)
to work, we need the sync and async instances within the Qdrant class.