diff --git a/libs/community/langchain_community/llms/minimax.py b/libs/community/langchain_community/llms/minimax.py index fdf114b3c6a..9aed9673b5b 100644 --- a/libs/community/langchain_community/llms/minimax.py +++ b/libs/community/langchain_community/llms/minimax.py @@ -95,10 +95,10 @@ class MinimaxCommon(BaseModel): @model_validator(mode="after") def post_init(self) -> Self: """Post initialization.""" - self._client = _MinimaxEndpointClient( - host=self.minimax_api_host, - api_key=self.minimax_api_key, - group_id=self.minimax_group_id, + self._client = _MinimaxEndpointClient( # type: ignore + host=self.minimax_api_host, # type: ignore + api_key=self.minimax_api_key, # type: ignore + group_id=self.minimax_group_id, # type: ignore ) return self diff --git a/libs/community/langchain_community/llms/solar.py b/libs/community/langchain_community/llms/solar.py index 071ffee8c68..d8f8dc001cb 100644 --- a/libs/community/langchain_community/llms/solar.py +++ b/libs/community/langchain_community/llms/solar.py @@ -95,6 +95,10 @@ class SolarCommon(BaseModel): @model_validator(mode="after") def post_init(self) -> Self: + if not isinstance(self.solar_api_key, SecretStr): + raise ValueError( + f"solar_api_key must be specified. Got type: {type(self.solar_api_key)}" + ) self._client = _SolarClient(api_key=self.solar_api_key, base_url=self.base_url) return self