Skip to content

Commit 71d5280

Browse files
committed
PR review comments
1 parent 4dba7e1 commit 71d5280

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

ads/aqua/client/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,13 +582,13 @@ def embeddings(
582582
payload = {**(payload or {}), "input": input}
583583
return self._request(payload=payload, headers=headers)
584584

585-
def list_models(self) -> Union[Dict[str, Any], Iterator[Mapping[str, Any]]]:
586-
"""Generate embeddings by sending a request to the endpoint.
585+
def fetch_data(self) -> Union[Dict[str, Any], Iterator[Mapping[str, Any]]]:
586+
"""Fetch Data in json format by sending a request to the endpoint.
587587
588588
Args:
589589
590590
Returns:
591-
Union[Dict[str, Any], Iterator[Mapping[str, Any]]]: The server's response, typically including the generated embeddings.
591+
Union[Dict[str, Any], Iterator[Mapping[str, Any]]]: The server's response, typically including the data in JSON format.
592592
"""
593593
# headers = {"Content-Type", "application/json"}
594594
response = self._client.get(self.endpoint)

ads/aqua/extension/deployment_handler.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ class AquaModelListHandler(AquaAPIhandler):
385385
@handle_exceptions
386386
def get(self, model_deployment_id):
387387
"""
388-
Handles streaming inference request for the Active Model Deployments
388+
Handles get model list for the Active Model Deployment
389389
Raises
390390
------
391391
HTTPError
@@ -395,10 +395,7 @@ def get(self, model_deployment_id):
395395
self.set_header("Content-Type", "application/json")
396396
endpoint: str = ""
397397
model_deployment = AquaDeploymentApp().get(model_deployment_id)
398-
if model_deployment.endpoint.endswith("/"):
399-
endpoint = model_deployment.endpoint + "predict/v1/models"
400-
else:
401-
endpoint = model_deployment.endpoint + "/predict/v1/models"
398+
endpoint = model_deployment.endpoint.rstrip("/") + "/predict/v1/models"
402399
aqua_client = Client(endpoint=endpoint)
403400
try:
404401
list_model_result = aqua_client.list_models()

0 commit comments

Comments
 (0)