Skip to content

UserWarning when using VertexAISearchRetriever without beta flag #925

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

Open
MSzele opened this issue May 16, 2025 · 0 comments
Open

UserWarning when using VertexAISearchRetriever without beta flag #925

MSzele opened this issue May 16, 2025 · 0 comments

Comments

@MSzele
Copy link

MSzele commented May 16, 2025

Description

When using VertexAISearchRetriever without the beta=True flag (default is False obviously), the following warning appears:

langchain_google_community/vertex_ai_search.py:364: UserWarning: Beta features are configured but beta=False. The following beta features will be ignored:['custom_embedding_ratio']

Possible reason

The beta version validation only checks for None equality

langchain_google_community/vertex_ai_search.py:363: if not self.beta and any(value is not None for value in beta_features.values()):

but the custom_embedding_ratio defaults to 0.0

langchain_google_community/vertex_ai_search.py:333: custom_embedding_ratio: Optional[float] = Field(default=0.0, ge=0.0, le=1.0)

Environment

  • langchain-google-community==2.0.7
  • langchain-google-vertexai==2.0.23

Unacceptable workaround

Set the custom_embedding_ratio to None when using VertexAISearchRetriever

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

No branches or pull requests

1 participant