Skip to content

Commit

Permalink
update error messages and fix local search bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jgbradley1 committed Jun 5, 2024
1 parent f6b046a commit 49389e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions backend/src/api/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def sanitize_name(name: str | None) -> str | None:
Sanitize a human-readable name by converting it to a SHA256 hash, then truncate
to 128 bit length to ensure it is within the 63 character limit imposed by Azure Storage.
The sanitized name will be used to identify container names for Azure Storage and CosmosDB.
The sanitized name will be used to identify container names in both Azure Storage and CosmosDB.
Args:
-----
Expand All @@ -138,7 +138,7 @@ def sanitize_name(name: str | None) -> str | None:

def retrieve_original_blob_container_name(sanitized_name: str) -> str | None:
"""
Retrieve the original human-readable container name of a sanitized name.
Retrieve the original human-readable container name of a sanitized blob name.
Args:
-----
Expand Down Expand Up @@ -166,7 +166,7 @@ def retrieve_original_blob_container_name(sanitized_name: str) -> str | None:

def retrieve_original_entity_config_name(sanitized_name: str) -> str | None:
"""
Retrieve the original human-readable entity config name of a sanitized name.
Retrieve the original human-readable entity config name of a sanitized entity config name.
Args:
-----
Expand Down
2 changes: 1 addition & 1 deletion backend/src/api/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ async def upload_files(
except ValueError:
raise HTTPException(
status_code=500,
detail=f"Invalid container name: '{storage_name}'. Please try a different name.",
detail=f"Invalid blob container name: '{storage_name}'. Please try a different name.",
)
try:
blob_service_client = BlobServiceClientSingletonAsync.get_instance()
Expand Down
8 changes: 4 additions & 4 deletions backend/src/api/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,11 @@ async def local_query(request: GraphRequest):
text_unit_df.document_ids = text_unit_df.document_ids.apply(
lambda x: [i + add_on for i in x]
)
text_unit_df.entity_ids = text_unit_df.entity_ids.apply(
lambda x: [i + add_on for i in x]
text_unit_df.entity_ids = text_unit_df.entity_ids.map(
lambda x: [i + add_on for i in x], na_action="ignore"
)
text_unit_df.relationship_ids = text_unit_df.relationship_ids.apply(
lambda x: [i + add_on for i in x]
text_unit_df.relationship_ids = text_unit_df.relationship_ids.map(
lambda x: [i + add_on for i in x], na_action="ignore"
)
text_unit_dfs.append(text_unit_df)

Expand Down

0 comments on commit 49389e7

Please sign in to comment.