refactor: solve json serializable issue
This commit is contained in:
parent
d70bab1c3c
commit
2ba06cc98c
1 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
"""This module contains the configuration for the graph database."""
|
"""This module contains the configuration for the graph database."""
|
||||||
|
|
||||||
from pathlib import Path
|
import os
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||||
import pydantic
|
import pydantic
|
||||||
|
|
@ -55,8 +55,8 @@ class GraphConfig(BaseSettings):
|
||||||
values.graph_filename = f"cognee_graph_{provider}"
|
values.graph_filename = f"cognee_graph_{provider}"
|
||||||
# Set file path based on graph database provider if no file path is provided
|
# Set file path based on graph database provider if no file path is provided
|
||||||
if not values.graph_file_path:
|
if not values.graph_file_path:
|
||||||
base = Path(get_absolute_path(".cognee_system")) / "databases"
|
base = os.path.join(get_absolute_path(".cognee_system"), "databases")
|
||||||
values.graph_file_path = base / values.graph_filename
|
values.graph_file_path = os.path.join(base, values.graph_filename)
|
||||||
return values
|
return values
|
||||||
|
|
||||||
def to_dict(self) -> dict:
|
def to_dict(self) -> dict:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue