Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Argilla Client to use provided API-URL #666

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/intelligence_layer/connectors/argilla/argilla_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def split_dataset(self, dataset_id: str, n_splits: int) -> None:

def _create_metadata_property(self, dataset_id: str, n_splits: int) -> None:
response = self.session.get(
f"http://localhost:6900/api/v1/me/datasets/{dataset_id}/metadata-properties"
f"{self.api_url}api/v1/me/datasets/{dataset_id}/metadata-properties"
)
response.raise_for_status()
existing_split_id = [
Expand All @@ -295,7 +295,7 @@ def _create_metadata_property(self, dataset_id: str, n_splits: int) -> None:
]
if len(existing_split_id) > 0:
self.session.delete(
f"http://localhost:6900/api/v1/metadata-properties/{existing_split_id[0]}"
f"{self.api_url}api/v1/metadata-properties/{existing_split_id[0]}"
)

data = {
Expand All @@ -307,7 +307,7 @@ def _create_metadata_property(self, dataset_id: str, n_splits: int) -> None:
}

response = self.session.post(
f"http://localhost:6900/api/v1/datasets/{dataset_id}/metadata-properties",
f"{self.api_url}api/v1/datasets/{dataset_id}/metadata-properties",
json=data,
)
response.raise_for_status()
Expand Down Expand Up @@ -340,7 +340,7 @@ def chunks(
]
}
response = self.session.patch(
f"http://localhost:6900/api/v1/datasets/{dataset_id}/records",
f"{self.api_url}api/v1/datasets/{dataset_id}/records",
json=data,
)
response.raise_for_status()
Expand Down