2929COVARIATES_TABLE = "output/create_final_covariates.parquet"
3030ENTITY_EMBEDDING_TABLE = "output/create_final_entities.parquet"
3131RELATIONSHIPS_TABLE = "output/create_final_relationships.parquet"
32- TEXT_UNITS_TABLE = "output/create_base_text_units .parquet"
33- DOCUMENTS_TABLE = "output/create_base_documents .parquet"
32+ TEXT_UNITS_TABLE = "output/create_final_text_units .parquet"
33+ DOCUMENTS_TABLE = "output/create_final_documents .parquet"
3434
3535
3636@source_route .get (
3939 response_model = ReportResponse ,
4040 responses = {200 : {"model" : ReportResponse }},
4141)
42- async def get_report_info (index_name : str , report_id : str ):
42+ async def get_report_info (index_name : str , report_id : int ):
4343 # check for existence of file the query relies on to validate the index is complete
4444 sanitized_index_name = sanitize_name (index_name )
4545 validate_index_file_exist (sanitized_index_name , COMMUNITY_REPORT_TABLE )
@@ -49,15 +49,15 @@ async def get_report_info(index_name: str, report_id: str):
4949 storage_options = pandas_storage_options (),
5050 )
5151 # check if report_id exists in the index
52- if not report_table ["community " ].isin ([report_id ]).any ():
52+ if not report_table ["human_readable_id " ].isin ([report_id ]).any ():
5353 raise ValueError (f"Report '{ report_id } ' not found in index '{ index_name } '." )
5454 # check if multiple reports with the same id exist (should not happen)
55- if len (report_table .loc [report_table ["community " ] == report_id ]) > 1 :
55+ if len (report_table .loc [report_table ["human_readable_id " ] == report_id ]) > 1 :
5656 raise ValueError (
5757 f"Multiple reports with id '{ report_id } ' found in index '{ index_name } '."
5858 )
5959 report_content = report_table .loc [
60- report_table ["community " ] == report_id , "full_content "
60+ report_table ["human_readable_id " ] == report_id , "full_content_json "
6161 ].to_numpy ()[0 ]
6262 return ReportResponse (text = report_content )
6363 except Exception :
@@ -97,7 +97,7 @@ async def get_chunk_info(index_name: str, text_unit_id: str):
9797 text_units = text_units .explode ("document_ids" )
9898
9999 # verify that text_unit_id exists in the index
100- if not text_units ["chunk_id " ].isin ([text_unit_id ]).any ():
100+ if not text_units ["human_readable_id " ].isin ([text_unit_id ]).any ():
101101 raise ValueError (
102102 f"Text unit '{ text_unit_id } ' not found in index '{ index_name } '."
103103 )
0 commit comments