from aurelio_sdk import ExtractResponse
# Local PDF file
response = client.extract_file(
file_path="document.pdf",
model="docling-base", # Higher accuracy model (replaces quality="high")
chunk=True, # Automatically chunk the document
wait=30 # Wait up to 30 seconds for processing
)
# Access the document ID for status checking
document_id = response.document.id
# If the document is still processing, wait for completion
if response.status != "complete":
final_response = client.wait_for(document_id=document_id, wait=300)
# Access the chunks once processing is complete
for chunk in final_response.chunks:
print(f"Chunk: {chunk.text[:100]}...")