Skip to content

Commit

Permalink
fix(tunes): use correct endpoint for tuning methods (#179)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Dvorak <toomas2d@gmail.com>
  • Loading branch information
Tomas2D committed Sep 28, 2023
1 parent 9e794ec commit 9ccf894
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/genai/routers/tunes.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

class TunesRouter:
TUNES = "/v1/tunes"
TUNE_METHODS = "/v1/tune_methods"

def __init__(self, service_url: str, api_key: str) -> None:
self.service_url = service_url.rstrip("/")
Expand Down Expand Up @@ -74,7 +75,7 @@ def delete_tune(self, tune_id: str):
"""
try:
endpoint = self.service_url + TunesRouter.TUNES + "/" + tune_id
return RequestHandler.delete(endpoint, key=self.key, parameters=tune_id)
return RequestHandler.delete(endpoint, key=self.key)
except Exception as e:
raise GenAiException(e)

Expand All @@ -85,7 +86,7 @@ def get_tune_methods(self):
Any: json with info about the available tune methods.
"""
try:
endpoint = self.service_url + "/tune_methods"
endpoint = self.service_url + self.TUNE_METHODS
return RequestHandler.get(endpoint, key=self.key)
except Exception as e:
raise GenAiException(e)
Expand Down

0 comments on commit 9ccf894

Please sign in to comment.