try few things
This commit is contained in:
parent
ad8ba24e2a
commit
4ccabbcc06
2 changed files with 5 additions and 4 deletions
|
|
@ -9,7 +9,7 @@ from pathlib import Path
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from cognee.root_dir import get_absolute_path
|
from cognee.root_dir import get_absolute_path
|
||||||
from cognee.shared.data_models import ChunkStrategy, DefaultGraphModel
|
from cognee.shared.data_models import ChunkStrategy, DefaultGraphModel
|
||||||
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
def load_dontenv():
|
def load_dontenv():
|
||||||
base_dir = Path(__file__).resolve().parent.parent
|
base_dir = Path(__file__).resolve().parent.parent
|
||||||
# Load the .env file from the base directory
|
# Load the .env file from the base directory
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
from cognee.config import Config
|
from cognee.config import Config
|
||||||
from .databases.relational import DuckDBAdapter, DatabaseEngine
|
from .databases.relational import DuckDBAdapter, DatabaseEngine
|
||||||
|
|
@ -11,7 +12,7 @@ from .data.chunking.DefaultChunkEngine import DefaultChunkEngine
|
||||||
from ..shared.data_models import GraphDBType, DefaultContentPrediction, KnowledgeGraph, SummarizedContent, \
|
from ..shared.data_models import GraphDBType, DefaultContentPrediction, KnowledgeGraph, SummarizedContent, \
|
||||||
LabeledContent, DefaultCognitiveLayer
|
LabeledContent, DefaultCognitiveLayer
|
||||||
|
|
||||||
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
|
||||||
class InfrastructureConfig():
|
class InfrastructureConfig():
|
||||||
config = Config()
|
config = Config()
|
||||||
|
|
@ -47,11 +48,11 @@ class InfrastructureConfig():
|
||||||
def get_config(self, config_entity: str = None) -> dict:
|
def get_config(self, config_entity: str = None) -> dict:
|
||||||
config = Config()
|
config = Config()
|
||||||
config.load()
|
config.load()
|
||||||
logging.info("cf path: %s", config.db_path)
|
logging.debug("cf path: %s", config.db_path)
|
||||||
if (config_entity is None or config_entity == "database_engine") and self.database_engine is None:
|
if (config_entity is None or config_entity == "database_engine") and self.database_engine is None:
|
||||||
|
|
||||||
|
|
||||||
db_path = self.system_root_directory + "/" + config.db_path
|
db_path = os.path.join(self.system_root_directory,config.db_path)
|
||||||
|
|
||||||
|
|
||||||
LocalStorage.ensure_directory_exists(db_path)
|
LocalStorage.ensure_directory_exists(db_path)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue