Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Azure converter updates #7409

Merged
merged 13 commits into from
Apr 9, 2024
Prev Previous commit
Next Next commit
Fix current_last_page_number calculation
  • Loading branch information
vblagoje committed Mar 27, 2024
commit f1d2d2466138d5398c941bf7b00e6325de2f95c6
2 changes: 1 addition & 1 deletion haystack/components/converters/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def _convert_to_natural_text(self, result: "AnalyzeResult", meta: Optional[Dict[
page_numbers = [b.page_number for b in paragraph.bounding_regions]
else:
# If page_number is not available we put the paragraph onto an existing page
current_last_page_number = sorted(paragraphs_to_pages.keys())[-1]
current_last_page_number = sorted(paragraphs_to_pages.keys())[-1] if paragraphs_to_pages else 1
page_numbers = [current_last_page_number]
tables_on_page = table_spans_by_page[page_numbers[0]]
# Check if paragraph is part of a table and if so skip
Expand Down