diff --git a/src/giskard_hub/resources/conversations.py b/src/giskard_hub/resources/conversations.py index 6dfe5d6..2d25f80 100644 --- a/src/giskard_hub/resources/conversations.py +++ b/src/giskard_hub/resources/conversations.py @@ -69,10 +69,7 @@ def update( ) def delete(self, conversation_id: str | List[str]) -> None: - if isinstance(conversation_id, str): - conversation_id = [conversation_id] - - return self._client.delete("/conversations", json=conversation_id) + return self._client.delete("/conversations", params={"conversation_ids": conversation_id}) def list(self, dataset_id: str) -> List[Conversation]: data = self._client.get(f"/datasets/{dataset_id}/conversations?limit=100000") diff --git a/src/giskard_hub/resources/datasets.py b/src/giskard_hub/resources/datasets.py index f527285..f4c1941 100644 --- a/src/giskard_hub/resources/datasets.py +++ b/src/giskard_hub/resources/datasets.py @@ -40,10 +40,7 @@ def update( ) def delete(self, dataset_id: str | List[str]) -> None: - if isinstance(dataset_id, str): - dataset_id = [dataset_id] - - self._client.delete("/datasets", json=dataset_id) + self._client.delete("/datasets", params={"datasets_ids": dataset_id}) def list(self, project_id: str) -> List[Dataset]: return self._client.get( diff --git a/src/giskard_hub/resources/evaluations.py b/src/giskard_hub/resources/evaluations.py index 9aff482..fd0ae55 100644 --- a/src/giskard_hub/resources/evaluations.py +++ b/src/giskard_hub/resources/evaluations.py @@ -70,11 +70,8 @@ def create_local( cast_to=EvaluationRun, ) - def delete(self, project_id: str | List[str]): - if isinstance(project_id, str): - project_id = [project_id] - - return self._client.delete("/executions", json=project_id) + def delete(self, execution_id: str | List[str]): + return self._client.delete("/executions", params={"execution_ids": execution_id}) def list(self, project_id: str): return self._client.get( diff --git a/src/giskard_hub/resources/models.py b/src/giskard_hub/resources/models.py index f996f3c..324c1bb 100644 --- a/src/giskard_hub/resources/models.py +++ b/src/giskard_hub/resources/models.py @@ -72,10 +72,7 @@ def update( ) def delete(self, model_id: str | List[str]) -> None: - if isinstance(model_id, str): - model_id = [model_id] - - self._client.delete("/models", json=model_id) + self._client.delete("/models", params={"model_ids": model_id}) def list(self, project_id: str) -> List[Model]: return self._client.get( diff --git a/src/giskard_hub/resources/projects.py b/src/giskard_hub/resources/projects.py index 38dc569..ec47e20 100644 --- a/src/giskard_hub/resources/projects.py +++ b/src/giskard_hub/resources/projects.py @@ -49,10 +49,7 @@ def update( ) def delete(self, project_id: str | List[str]): - if isinstance(project_id, str): - project_id = [project_id] - - return self._client.delete("/projects", json=project_id) + return self._client.delete("/projects", params={"project_ids": project_id}) def list(self): return self._client.get("/projects", cast_to=Project)