-
Notifications
You must be signed in to change notification settings - Fork 341
Closed
Labels
Description
When using the provided example:
retriever = VertexAISearchRetriever(
project_id=PROJECT_ID,
location_id=LOCATION_ID,
search_engine_id=SEARCH_ENGINE_ID,
max_documents=3,
engine_data_type=3,
)
Positionning engine_data_type=3 is not accepted:
---------------------------------------------------------------------------
ValidationError Traceback (most recent call last)
[<ipython-input-8-b99963467831>](https://localhost:8080/#) in <cell line: 0>()
----> 1 retriever = VertexAISearchRetriever(
2 project_id=PROJECT_ID,
3 location_id=LOCATION_ID,
4 search_engine_id=SEARCH_ENGINE_ID,
5 max_documents=3,
3 frames
[/usr/local/lib/python3.11/dist-packages/langchain_google_community/vertex_ai_search.py](https://localhost:8080/#) in __init__(self, **kwargs)
343 def __init__(self, **kwargs: Any) -> None:
344 """Initialize the retriever with the appropriate version of the client."""
--> 345 super().__init__(**kwargs)
346 self._validate_version_compatibility()
347 self._initialize_client()
[/usr/local/lib/python3.11/dist-packages/langchain_google_community/vertex_ai_search.py](https://localhost:8080/#) in __init__(self, **kwargs)
88 def __init__(self, **kwargs: Any) -> None:
89 beta = kwargs.pop("beta", False)
---> 90 super().__init__(**kwargs)
91 self._beta = beta
92
[/usr/local/lib/python3.11/dist-packages/langchain_core/load/serializable.py](https://localhost:8080/#) in __init__(self, *args, **kwargs)
123 def __init__(self, *args: Any, **kwargs: Any) -> None:
124 """"""
--> 125 super().__init__(*args, **kwargs)
126
127 @classmethod
[/usr/local/lib/python3.11/dist-packages/pydantic/main.py](https://localhost:8080/#) in __init__(self, **data)
212 # `__tracebackhide__` tells pytest and some other tools to omit this function from tracebacks
213 __tracebackhide__ = True
--> 214 validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
215 if self is not validated_self:
216 warnings.warn(
ValidationError: 2 validation errors for VertexAISearchRetriever
engine_data_type
Input should be less than or equal to 2 [type=less_than_equal, input_value=3, input_type=int]
For further information visit https://errors.pydantic.dev/2.10/v/less_than_equal
search_engine_id
Extra inputs are not permitted [type=extra_forbidden, input_value='test', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/extra_forbidden