Skip to content

Commit 35b47d4

Browse files
replaced inferenceapis with models in model routes
1 parent a5644ab commit 35b47d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

singlestoredb/management/inference_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def __init__(self, manager: Optional[Manager]):
219219
def get(self, model_name: str) -> InferenceAPIInfo:
220220
if self._manager is None:
221221
raise ManagementError(msg='Manager not initialized')
222-
res = self._manager._get(f'inferenceapis/{self.project_id}/{model_name}').json()
222+
res = self._manager._get(f'models/{self.project_id}/{model_name}').json()
223223
inference_api = InferenceAPIInfo.from_dict(res)
224224
inference_api._manager = self # Associate the manager
225225
return inference_api
@@ -241,7 +241,7 @@ def start(self, model_name: str) -> ModelOperationResult:
241241
"""
242242
if self._manager is None:
243243
raise ManagementError(msg='Manager not initialized')
244-
res = self._manager._post(f'inferenceapis/{model_name}/start')
244+
res = self._manager._post(f'models/{model_name}/start')
245245
return ModelOperationResult.from_start_response(res.json())
246246

247247
def stop(self, model_name: str) -> ModelOperationResult:
@@ -261,5 +261,5 @@ def stop(self, model_name: str) -> ModelOperationResult:
261261
"""
262262
if self._manager is None:
263263
raise ManagementError(msg='Manager not initialized')
264-
res = self._manager._post(f'inferenceapis/{model_name}/stop')
264+
res = self._manager._post(f'models/{model_name}/stop')
265265
return ModelOperationResult.from_stop_response(res.json())

0 commit comments

Comments
 (0)