Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore extra variables in env files #2226

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Conversation

AliSayyah
Copy link
Contributor

@AliSayyah AliSayyah commented Dec 11, 2024

Please describe the purpose of this pull request.
with v0.6.3, if you have extra variables in your .env file, letta fails to initiate because of the default behavior of SettingsConfDict.

How to test
Just try to import ChatMemory with extra variables in your .env file.

Have you tested this PR?
Have you tested the latest commit on the PR? If so please provide outputs from your tests.

Related issues or PRs
Please link any related GitHub issues or PRs.

Is your PR over 500 lines of code?
If so, please break up your PR into multiple smaller PRs so that we can review them quickly, or provide justification for its length.

Additional context

 |   File "/usr/local/lib/python3.12/site-packages/letta/settings.py", line 114, in <module>
gpt  |     model_settings = ModelSettings()
gpt  |                      ^^^^^^^^^^^^^^^
gpt  |   File "/usr/local/lib/python3.12/site-packages/pydantic_settings/main.py", line 167, in __init__
gpt  |     super().__init__(
gpt  |   File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 212, in __init__
gpt  |     validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
gpt  |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gpt  | pydantic_core._pydantic_core.ValidationError: 18 validation errors for ModelSettings
gpt  | farsar_openai_api_key
gpt  |   Extra inputs are not permitted [type=extra_forbidden, input_value='sk-proj-osDZ-EC1p...BIKkifGyT40-OCcA', input_type=str]
gpt  |     For further information visit https://errors.pydantic.dev/2.9/v/extra_forbidden

Copy link
Collaborator

@sarahwooders sarahwooders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for contributing this!

@sarahwooders sarahwooders merged commit 5c7354b into letta-ai:main Dec 11, 2024
16 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants