Update cognee/base_config.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Neeraj Gopalakrishnan 2025-08-29 02:31:58 -07:00 committed by GitHub
parent b06fe395b3
commit aa3d704adc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,15 +13,15 @@ class BaseConfig(BaseSettings):
monitoring_tool: object = Observer.LANGFUSE
@pydantic.model_validator(mode="after")
def validate_paths(cls, values):
def validate_paths(self):
# Require absolute paths for root directories
values.data_root_directory = ensure_absolute_path(
values.data_root_directory, allow_relative=False
self.data_root_directory = ensure_absolute_path(
self.data_root_directory, allow_relative=False
)
values.system_root_directory = ensure_absolute_path(
values.system_root_directory, allow_relative=False
self.system_root_directory = ensure_absolute_path(
self.system_root_directory, allow_relative=False
)
return values
return self
langfuse_public_key: Optional[str] = os.getenv("LANGFUSE_PUBLIC_KEY")
langfuse_secret_key: Optional[str] = os.getenv("LANGFUSE_SECRET_KEY")