parallex 0.3.1__py3-none-any.whl → 0.3.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,6 +18,7 @@ class OpenAIClient:
18
18
  azure_endpoint=os.getenv("AZURE_API_BASE"),
19
19
  api_key=os.getenv("AZURE_API_KEY"),
20
20
  api_version=os.getenv("AZURE_API_VERSION"),
21
+ timeout=3000,
21
22
  )
22
23
 
23
24
  async def upload(self, file_path: str) -> FileObject:
parallex/parallex.py CHANGED
@@ -106,6 +106,9 @@ async def _prompts_execute(
106
106
  process_semaphore = asyncio.Semaphore(concurrency)
107
107
  prompt_tasks = []
108
108
  for batch in batch_jobs:
109
+ logger.info(
110
+ f"waiting for batch to complete - {batch.id} - {batch.trace_id}"
111
+ )
109
112
  prompt_task = asyncio.create_task(
110
113
  _wait_and_create_prompt_responses(batch=batch, client=open_ai_client, semaphore=process_semaphore)
111
114
  )
@@ -174,7 +177,7 @@ async def _execute(
174
177
 
175
178
  pages = [page for batch_pages in page_groups for page in batch_pages]
176
179
  logger.info(f"pages done. total pages- {len(pages)} - {trace_id}")
177
- sorted_pages = sorted(pages, key=lambda x: x.prompt_index)
180
+ sorted_pages = sorted(pages, key=lambda x: x.page_number)
178
181
 
179
182
  # TODO add combined version of MD to output / save to file system
180
183
  callable_output = ParallexCallableOutput(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: parallex
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary: PDF to markdown using Azure OpenAI batch processing
5
5
  Home-page: https://github.com/Summed-AI/parallex
6
6
  Author: Jeff Hostetler
@@ -1,6 +1,6 @@
1
1
  parallex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  parallex/ai/batch_processor.py,sha256=O5q_jaIU0VI93p7Riq4aZ_qUiN9Omxp5GOfn0IqEYgo,1361
3
- parallex/ai/open_ai_client.py,sha256=TRH78oYod_EWpp3hjEh097OT7hwsQmtv44_j3X9Frxo,2047
3
+ parallex/ai/open_ai_client.py,sha256=CT8q5XEcMr24RlAOaj3-OezruZLczwPtmUafPQWDYXc,2073
4
4
  parallex/ai/output_processor.py,sha256=Rwp8dkLo4xsqooeBh3Xv-uGVbJMG1JQkwyxdUoOs2tQ,1800
5
5
  parallex/ai/uploader.py,sha256=72SZ3KYQSQL1GI0eCUvRDgDxWhz5vLTU_dRhN7cZg84,5443
6
6
  parallex/file_management/converter.py,sha256=Rj-93LXNl2gCY-XUOCZv7DdCNI2-GyRpS5FobnTqwzo,1111
@@ -15,10 +15,10 @@ parallex/models/parallex_prompts_callable_output.py,sha256=IlNX9627_E8aXWQ-vDBuv
15
15
  parallex/models/prompt_response.py,sha256=LcctuyqwiTHWrZHSahwauMaSBsin5Ws6fQRAzGXTsAA,230
16
16
  parallex/models/raw_file.py,sha256=Nlv6u_jlDCXDgU2_Ff7DRbDCx27pB1NZugNhEoaBMQU,483
17
17
  parallex/models/upload_batch.py,sha256=jrnds9ryXg9drL4TF8TGimMVTCDfKaWsBzFv_ed0i88,2068
18
- parallex/parallex.py,sha256=30DKfec3uHCfyoLj0-wMaSltHn3kLsnW0kJsfFFgktk,8745
18
+ parallex/parallex.py,sha256=0nOfEXeiuTKi0gQSnqdNyPxIYvuE7Wfp4HtmSbVsEs4,8864
19
19
  parallex/utils/constants.py,sha256=508ieZLZ5kse0T4_QyNJp57Aq0DMNFjjyFlsKa0xtek,366
20
20
  parallex/utils/logger.py,sha256=i3ZZ7YTUmhUStbvVME67F9ffnkLOv5ijm7wVUyJT8Ys,440
21
- parallex-0.3.1.dist-info/LICENSE,sha256=wPwCqGrisXnEcpaUxSO79C2mdOUTbtjhLjyy8mVW6p8,1046
22
- parallex-0.3.1.dist-info/METADATA,sha256=PBeHVqfrMvtGgny4FlkkyYt6nY-Ngbk8Z-6rEhukX_Q,4461
23
- parallex-0.3.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
24
- parallex-0.3.1.dist-info/RECORD,,
21
+ parallex-0.3.3.dist-info/LICENSE,sha256=wPwCqGrisXnEcpaUxSO79C2mdOUTbtjhLjyy8mVW6p8,1046
22
+ parallex-0.3.3.dist-info/METADATA,sha256=fzazYVvXs_eMOfZKF-9xnSjZPz53jlTX-o4h-EdiTF8,4461
23
+ parallex-0.3.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
24
+ parallex-0.3.3.dist-info/RECORD,,