mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-25 16:13:25 +00:00
xqx
This commit is contained in:
parent
5ab96e8dcb
commit
55da3ae7a2
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user