feat: Add ability to change graph database configuration through cognee
This commit is contained in:
parent
c5e15d715a
commit
6b57bfc4cb
1 changed files with 12 additions and 0 deletions
|
|
@ -131,6 +131,18 @@ class config:
|
|||
message=f"'{key}' is not a valid attribute of the config."
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def set_graph_db_config(config_dict: dict) -> None:
|
||||
"""
|
||||
Updates the graph db config with values from config_dict.
|
||||
"""
|
||||
graph_db_config = get_graph_config()
|
||||
for key, value in config_dict.items():
|
||||
if hasattr(graph_db_config, key):
|
||||
object.__setattr__(graph_db_config, key, value)
|
||||
else:
|
||||
raise AttributeError(message=f"'{key}' is not a valid attribute of the config.")
|
||||
|
||||
@staticmethod
|
||||
def set_vector_db_config(config_dict: dict):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue