chatterer 0.1.27__py3-none-any.whl → 0.1.28__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.
@@ -475,16 +475,14 @@ def render_pdf_as_image(
475
475
  dict[int, bytes]: A dictionary mapping page numbers to image bytes.
476
476
  """
477
477
  from pymupdf import Matrix # pyright: ignore[reportMissingTypeStubs]
478
- from pymupdf.utils import get_pixmap # pyright: ignore[reportMissingTypeStubs, reportUnknownVariableType]
479
478
 
480
479
  images_bytes: dict[int, bytes] = {}
481
480
  matrix = Matrix(zoom, zoom) # Control output resolution
482
481
  for page_idx in _get_page_indices(page_indices=page_indices, max_doc_pages=len(doc), is_input_zero_based=True):
482
+ page = doc[page_idx]
483
+ pixmap = page.get_pixmap(matrix=matrix) # pyright: ignore[reportUnknownMemberType]
483
484
  img_bytes = bytes(
484
- get_pixmap(
485
- page=doc[page_idx],
486
- matrix=matrix,
487
- ).tobytes(output=output, jpg_quality=jpg_quality) # pyright: ignore[reportUnknownArgumentType]
485
+ pixmap.tobytes(output=output, jpg_quality=jpg_quality) # pyright: ignore[reportUnknownArgumentType]
488
486
  )
489
487
  images_bytes[page_idx] = img_bytes
490
488
  return images_bytes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chatterer
3
- Version: 0.1.27
3
+ Version: 0.1.28
4
4
  Summary: The highest-level interface for various LLM APIs.
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
@@ -19,7 +19,7 @@ chatterer/examples/upstage.py,sha256=IUKHM-QeAnJStcQjQIjxpqnSjJV1iCpZvU9KUxQU-oo
19
19
  chatterer/examples/web2md.py,sha256=ofUgBBhTVaSHH6G-u5c3D8NZdQxtJZoomQuDun2SswE,3207
20
20
  chatterer/tools/__init__.py,sha256=m3PRK9H5vOhk-2gG9W2eg8CYBlEn-K9-eaulOu91bgo,1474
21
21
  chatterer/tools/caption_markdown_images.py,sha256=sJU1F0OgNniwe1qy1vHOC7BkU61GxV6JEXqAFZD_38g,15508
22
- chatterer/tools/convert_pdf_to_markdown.py,sha256=AHDo9mlaPS4QTj19x5_AAvtOyXZRzkh5k4-PyWbvcIg,28443
22
+ chatterer/tools/convert_pdf_to_markdown.py,sha256=8soEbXT_yHQwL_GpGLFkVA6uvB6JJdzlkGXceoXlEB4,28365
23
23
  chatterer/tools/convert_to_text.py,sha256=1UVT8Ipzx4lx6-MjMISe4RbufnYur8QzbJ0sg7MxSFE,15445
24
24
  chatterer/tools/upstage_document_parser.py,sha256=rWOMEyIOwPu4nLHVwDneLzMMLic8BjmdZ3LOUQJjq_o,33005
25
25
  chatterer/tools/webpage_to_markdown.py,sha256=ADH4sqM6iquJR7HU6umMQ5qO7EvcbNutuchXDpAcxAo,31961
@@ -36,8 +36,8 @@ chatterer/utils/base64_image.py,sha256=HNydRF0r_kEEPXS4Hv1q9_pZPz_Q05qknZzXK9d4-
36
36
  chatterer/utils/bytesio.py,sha256=3MC2atOOFKo5YxuReo_y_t8Wem9p2Y1ahC5M2lGclwI,2618
37
37
  chatterer/utils/code_agent.py,sha256=7ka_WRI4TQmZ5H46mjY3hI6RO_pxw6pg3LAxjgW4AbM,10495
38
38
  chatterer/utils/imghdr.py,sha256=irVDKavn9nx-tPUbEnvTCrq9LVePYrCccl9-KDHZjGQ,3687
39
- chatterer-0.1.27.dist-info/METADATA,sha256=BEjVcy6tTdinqe9pIQOlQ5ejdMO9RsfiYrtsR_dLHB4,11467
40
- chatterer-0.1.27.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
41
- chatterer-0.1.27.dist-info/entry_points.txt,sha256=IzGKhTnZ7G5V23SRmulmSsyt9HcaFH4lU4r3wR1zMsc,63
42
- chatterer-0.1.27.dist-info/top_level.txt,sha256=7nSQKP0bHxPRc7HyzdbKsJdkvPgYD0214o6slRizv9s,10
43
- chatterer-0.1.27.dist-info/RECORD,,
39
+ chatterer-0.1.28.dist-info/METADATA,sha256=wnG1Zsr1Oev7vQA6y-l8sjR0Avv4aT9PLWivVEx6Y04,11467
40
+ chatterer-0.1.28.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
41
+ chatterer-0.1.28.dist-info/entry_points.txt,sha256=IzGKhTnZ7G5V23SRmulmSsyt9HcaFH4lU4r3wR1zMsc,63
42
+ chatterer-0.1.28.dist-info/top_level.txt,sha256=7nSQKP0bHxPRc7HyzdbKsJdkvPgYD0214o6slRizv9s,10
43
+ chatterer-0.1.28.dist-info/RECORD,,