fix review comment against health check env var naming

This commit is contained in:
Sumit Jaiswal 2025-06-04 20:47:58 +05:30
parent f235e2eca1
commit 61cd8540de
No known key found for this signature in database
GPG key ID: A4604B39D64D6AEC
2 changed files with 3 additions and 1 deletions

View file

@ -33,7 +33,7 @@ class WatsonXConfig(BaseModel):
description="The Project ID key, only needed of using the hosted service",
)
model_id: str | None = Field(
default_factory=lambda: os.getenv("WATSONX_MODEL_ID", "ibm/granite-3-8b-instruct"),
default_factory=lambda: os.getenv("WATSONX_HEALTH_CHECK_MODEL_ID", "ibm/granite-3-8b-instruct"),
description="The Model ID key, only needed of using the hosted service",
)
timeout: int = Field(

View file

@ -85,6 +85,8 @@ class WatsonXInferenceAdapter(Inference, ModelRegistryHelper):
Performs a health check by verifying connectivity to the Watsonx server.
This method is used by the Provider API to verify
that the service is running correctly.
Specify the model ID as WATSONX_HEALTH_CHECK_MODEL_ID under env. var.
to use for the health check, which defaults to "ibm/granite-3-8b-instruct".
Returns:
HealthResponse: A dictionary containing the health status.
"""