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

community: enforce attribute validation in VertexAISearchRetriever #246

Merged
merged 1 commit into from
May 23, 2024

Conversation

yoursemicolon
Copy link
Contributor

This commit updates the VertexAISearchRetriever configuration to forbid unknown fields during initialization. This change ensures that users receive immediate feedback if they accidentally pass a wrong or misspelled attribute name, improving error handling and robustness of the initialization process.

The change modifies the Pydantic BaseModel configuration to set extra = Extra.forbid, which throws errors for any extraneous fields. This update is essential for preventing runtime errors related to attribute misconfigurations and is in line with best practices for Pydantic model setup.

@yoursemicolon
Copy link
Contributor Author

please review @lkuligin

@lkuligin lkuligin merged commit 3fb9667 into langchain-ai:main May 23, 2024
15 checks passed
eliasecchig pushed a commit to eliasecchig/langchain-google that referenced this pull request May 27, 2024
eliasecchig pushed a commit to eliasecchig/langchain-google that referenced this pull request May 30, 2024
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.

None yet

2 participants