mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 19:04:19 +00:00
update querying logic to avoid token use
This commit is contained in:
parent
8de3feb53b
commit
1a4ae92502
1 changed files with 3 additions and 3 deletions
|
@ -89,11 +89,11 @@ class WatsonXInferenceAdapter(Inference, ModelRegistryHelper):
|
||||||
HealthResponse: A dictionary containing the health status.
|
HealthResponse: A dictionary containing the health status.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
model = self._get_client(self._config.model_id)
|
client_model = self._get_client(self._config.model_id)
|
||||||
model.generate("test")
|
client_model.get_details()
|
||||||
return HealthResponse(status=HealthStatus.OK)
|
return HealthResponse(status=HealthStatus.OK)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
return HealthResponse(status=HealthStatus.ERROR, message=f"Health check failed: {str(ex)}")
|
return HealthResponse(status=HealthStatus.ERROR, message=f"Health check failure reason: {str(ex)}")
|
||||||
|
|
||||||
async def completion(
|
async def completion(
|
||||||
self,
|
self,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue