ALlowing more tokens

This commit is contained in:
Jake Poznanski 2025-05-29 19:59:58 +00:00
parent 022be37723
commit 2cb14cceae

View File

@ -106,7 +106,7 @@ class PageResult:
async def build_page_query(local_pdf_path: str, page: int, target_longest_image_dim: int, target_anchor_text_len: int, image_rotation: int = 0) -> dict: async def build_page_query(local_pdf_path: str, page: int, target_longest_image_dim: int, target_anchor_text_len: int, image_rotation: int = 0) -> dict:
MAX_TOKENS = 3000 MAX_TOKENS = 4000
assert image_rotation in [0, 90, 180, 270], "Invalid image rotation provided in build_page_query" assert image_rotation in [0, 90, 180, 270], "Invalid image rotation provided in build_page_query"
# Allow the page rendering to process in the background while we get the anchor text (which blocks the main thread) # Allow the page rendering to process in the background while we get the anchor text (which blocks the main thread)