try few things
This commit is contained in:
parent
23051b7ddd
commit
0f3db308a1
2 changed files with 3 additions and 37 deletions
|
|
@ -94,40 +94,9 @@ class Config:
|
|||
# Monitoring tool
|
||||
monitoring_tool: str = os.getenv("MONITORING_TOOL", MonitoringTool.LANGFUSE)
|
||||
|
||||
if (
|
||||
os.getenv("ENV") == "prod"
|
||||
or os.getenv("ENV") == "dev"
|
||||
or os.getenv("AWS_ENV") == "dev"
|
||||
or os.getenv("AWS_ENV") == "prd"
|
||||
):
|
||||
load_dotenv()
|
||||
logging.info("graph_db_url: %s", os.getenv("GRAPH_DB_URL_PROD"))
|
||||
graph_database_url: str = os.getenv("GRAPH_DB_URL_PROD")
|
||||
graph_database_username: str = os.getenv("GRAPH_DB_USER")
|
||||
graph_database_password: str = os.getenv("GRAPH_DB_PW")
|
||||
else:
|
||||
logging.info("graph_db_url: %s", os.getenv("GRAPH_DB_URL"))
|
||||
graph_database_url: str = os.getenv("GRAPH_DB_URL")
|
||||
graph_database_username: str = os.getenv("GRAPH_DB_USER")
|
||||
graph_database_password: str = os.getenv("GRAPH_DB_PW")
|
||||
|
||||
weaviate_url: str = os.getenv("WEAVIATE_URL")
|
||||
weaviate_api_key: str = os.getenv("WEAVIATE_API_KEY")
|
||||
|
||||
if (
|
||||
os.getenv("ENV") == "prod"
|
||||
or os.getenv("ENV") == "dev"
|
||||
or os.getenv("AWS_ENV") == "dev"
|
||||
or os.getenv("AWS_ENV") == "prd"
|
||||
):
|
||||
load_dotenv()
|
||||
|
||||
db_host: str = os.getenv("POSTGRES_HOST")
|
||||
logging.info("db_host: %s", db_host)
|
||||
db_user: str = os.getenv("POSTGRES_USER")
|
||||
db_password: str = os.getenv("POSTGRES_PASSWORD")
|
||||
db_name: str = os.getenv("POSTGRES_DB")
|
||||
|
||||
# Model parameters and configuration for interlayer scoring
|
||||
intra_layer_score_treshold: float = 0.98
|
||||
|
||||
|
|
|
|||
|
|
@ -47,19 +47,16 @@ class InfrastructureConfig():
|
|||
def get_config(self, config_entity: str = None) -> dict:
|
||||
config = Config()
|
||||
config.load()
|
||||
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:
|
||||
logging.debug("cf sdsds:")
|
||||
|
||||
db_path = os.path.join(self.system_root_directory,config.db_path)
|
||||
logging.debug("db_path cfg: %s", db_path)
|
||||
logging.debug("db_name cfg: %s", config.db_name)
|
||||
|
||||
|
||||
LocalStorage.ensure_directory_exists(db_path)
|
||||
|
||||
self.database_engine = DuckDBAdapter(
|
||||
db_name = config.db_name,
|
||||
db_name = "cognee.db",
|
||||
db_path = db_path
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue