@@ -26,7 +26,7 @@ async def parse_file(
2626 pages = [page async for page in processor .parser .parse (content = file .content )]
2727 logger .info ("Splitting '%s' into sections" , file .filename ())
2828 if image_embeddings :
29- logger .info ("Each page will be split into smaller chunks of text, but images will be of the entire page." )
29+ logger .warning ("Each page will be split into smaller chunks of text, but images will be of the entire page." )
3030 sections = [
3131 Section (split_page , content = file , category = category ) for split_page in processor .splitter .split_pages (pages )
3232 ]
@@ -121,25 +121,6 @@ async def run(self):
121121 await self .blob_manager .remove_blob ()
122122 await search_manager .remove_content ()
123123
124- async def process_file (self , file , search_manager ):
125- try :
126- sections = await parse_file (file , self .file_processors , self .category , self .image_embeddings )
127- if sections :
128- blob_sas_uris = await self .blob_manager .upload_blob (file )
129- blob_image_embeddings : Optional [List [List [float ]]] = None
130- if self .image_embeddings and blob_sas_uris :
131- blob_image_embeddings = await self .image_embeddings .create_embeddings (blob_sas_uris )
132- await search_manager .update_content (
133- sections = sections , file = file , image_embeddings = blob_image_embeddings
134- )
135- finally :
136- if file :
137- file .close ()
138-
139- async def remove_file (self , path , search_manager ):
140- await self .blob_manager .remove_blob (path )
141- await search_manager .remove_content (path )
142-
143124
144125class UploadUserFileStrategy :
145126 """
0 commit comments