AsyncMongoDb class.
Usage
You need to provide eitherdb_url or db_client. The following example uses db_url.
Install the pymongo (4.9 or later), openai, and ddgs packages:
motor clients are also supported, but motor is deprecated. Use PyMongo’s async client instead.Run MongoDB
Install docker desktop and run MongoDB on port 27017 using:async_mongodb_for_agent.py