Skip to content

Commit

Permalink
Resolving all comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush-cohere committed Oct 9, 2024
1 parent 72410fe commit de27fe7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions compass_sdk/compass.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def __init__(
"add_context": "/api/v1/indexes/{index_name}/documents/add_context/{doc_id}",
"refresh": "/api/v1/indexes/{index_name}/refresh",
"push_documents": "/api/v2/indexes/{index_name}/documents",
"edit_group_authorization": "/v1/indexes/{index_name}/group_authorization",
"edit_group_authorization": "api/v1/indexes/{index_name}/group_authorization",
}
logger.setLevel(logger_level.value)

Expand Down Expand Up @@ -355,7 +355,7 @@ def insert_docs(
:param sleep_retry_seconds: the number of seconds to wait before retrying an API request
:param errors_sliding_window_size: the size of the sliding window to keep track of errors
:param skip_first_n_docs: number of docs to skip indexing. Useful when insertion failed after N documents
:param authorized_groups: the groups that are authorized to access the documents, these groups should exist in RBAC
:param authorized_groups: the groups that are authorized to access the documents. These groups should exist in RBAC. None passed will make the documents public
"""

def put_request(
Expand Down
7 changes: 0 additions & 7 deletions compass_sdk/rbac.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@
)


def create_root_user(compass_url: str, tenancy_token: str) -> UserCreateResponse:
headers = {"Authorization": f"Bearer {tenancy_token}", "Content-Type": "application/json"}
response = requests.post(f"{compass_url}/security/admin/rbac/v1/root", headers=headers)
response.raise_for_status()
return UserCreateResponse.model_validate(response.json())


class CompassRootClient:
def __init__(self, compass_url: str, root_user_token: str):
self.base_url = compass_url + "/security/admin/rbac"
Expand Down

0 comments on commit de27fe7

Please sign in to comment.