Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.
Python aiburrchatbot-frameworkdagsgenerative-aigraphshacktoberfestllmopsllmsmlopspersistent-data-structurestate-machinestate-managementvisibility
Adds kwargs to mongo persister
Stefan Krawczyk8e4e574ff7ae
diff --git a/burr/integrations/persisters/b_mongodb.py b/burr/integrations/persisters/b_mongodb.pyindex 0947620d..4913f087 100644--- a/burr/integrations/persisters/b_mongodb.py+++ b/burr/integrations/persisters/b_mongodb.py@@ -36,9 +36,12 @@ class MongoDBPersister(persistence.BaseStatePersister):db_name="mydatabase",collection_name="mystates",serde_kwargs: dict = None,+ mongo_client_kwargs: dict = None,):"""Initializes the MongoDBPersister class."""- self.client = MongoClient(uri)+ if mongo_client_kwargs is None:+ mongo_client_kwargs = {}+ self.client = MongoClient(uri, **mongo_client_kwargs)self.db = self.client[db_name]self.collection = self.db[collection_name]self.serde_kwargs = serde_kwargs or {}