Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
eyurtsev committed Mar 22, 2024
1 parent 406b97a commit 4021fc1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/server/extraction_runnable.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ async def extract_entire_document(
]

# Limit the number of chunks to process
if len(extraction_requests) < settings.MAX_CHUNKS:
if len(extraction_requests) > settings.MAX_CHUNKS and settings.MAX_CHUNKS > 0:
content_too_long = True
extraction_requests = extraction_requests[: settings.MAX_CHUNKS]
else:
Expand Down
4 changes: 2 additions & 2 deletions backend/tests/unit_tests/api/test_api_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,6 @@ async def test_extract_from_large_file() -> None:
)
assert response.status_code == 200
assert response.json() == {
"data": ["a", "b"],
"content_too_long": False,
"data": ["a"],
"content_too_long": True,
}

0 comments on commit 4021fc1

Please sign in to comment.