From 5c7354be38fe7ab860e5299466077424030f233c Mon Sep 17 00:00:00 2001 From: ali sayyah Date: Thu, 12 Dec 2024 02:45:17 +0330 Subject: [PATCH] ignore extra variables in env files (#2226) --- letta/settings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/letta/settings.py b/letta/settings.py index 41aca91d00..8da6b3aaca 100644 --- a/letta/settings.py +++ b/letta/settings.py @@ -17,7 +17,7 @@ class ToolSettings(BaseSettings): class ModelSettings(BaseSettings): - model_config = SettingsConfigDict(env_file='.env') + model_config = SettingsConfigDict(env_file='.env', extra='ignore') # env_prefix='my_prefix_' @@ -64,7 +64,7 @@ class ModelSettings(BaseSettings): class Settings(BaseSettings): - model_config = SettingsConfigDict(env_prefix="letta_") + model_config = SettingsConfigDict(env_prefix="letta_", extra='ignore') letta_dir: Optional[Path] = Field(Path.home() / ".letta", env="LETTA_DIR") debug: Optional[bool] = False @@ -103,7 +103,7 @@ def letta_pg_uri_no_default(self) -> str: class TestSettings(Settings): - model_config = SettingsConfigDict(env_prefix="letta_test_") + model_config = SettingsConfigDict(env_prefix="letta_test_", extra='ignore') letta_dir: Optional[Path] = Field(Path.home() / ".letta/test", env="LETTA_TEST_DIR")