Replies: 1 comment
|
Keep one Creating a new client per HTTP request just adds overhead. Same idea if you're using LangChain's Only create a new client if the URL or API key changes, or in tests where you want isolation. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I've created a chatbot server, which uses a
QdrantClientinstance to execute searches against the database (via a langchainQdrantVectorStoreinstance): should I keep the client instance connection open as long as my server is running? Or should I create a new client instance each time I receive an HTTP request and then close it again after it's served the request? (And if the latter, it would be great if there was aQdrantClient.reopen()method, because theQdrantVectorStoreclass doesn't provide a way to update the client if the old client instance is closed and a new client instance is created!).All reactions