Skip to content

Commit

Permalink
ignore extra variables in env files (#2226)
Browse files Browse the repository at this point in the history
  • Loading branch information
AliSayyah authored Dec 11, 2024
1 parent 36a2960 commit 5c7354b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions letta/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_'

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 5c7354b

Please sign in to comment.