mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-27 17:08:47 +00:00
xqx
This commit is contained in:
parent
5ab96e8dcb
commit
55da3ae7a2
@ -95,10 +95,10 @@ class MinimaxCommon(BaseModel):
|
|||||||
@model_validator(mode="after")
|
@model_validator(mode="after")
|
||||||
def post_init(self) -> Self:
|
def post_init(self) -> Self:
|
||||||
"""Post initialization."""
|
"""Post initialization."""
|
||||||
self._client = _MinimaxEndpointClient(
|
self._client = _MinimaxEndpointClient( # type: ignore
|
||||||
host=self.minimax_api_host,
|
host=self.minimax_api_host, # type: ignore
|
||||||
api_key=self.minimax_api_key,
|
api_key=self.minimax_api_key, # type: ignore
|
||||||
group_id=self.minimax_group_id,
|
group_id=self.minimax_group_id, # type: ignore
|
||||||
)
|
)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
@ -95,6 +95,10 @@ class SolarCommon(BaseModel):
|
|||||||
|
|
||||||
@model_validator(mode="after")
|
@model_validator(mode="after")
|
||||||
def post_init(self) -> Self:
|
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)
|
self._client = _SolarClient(api_key=self.solar_api_key, base_url=self.base_url)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user