File size: 382 Bytes
6e02dfb
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
from docling.document_converter import DocumentConverter

def test_read():
    # Kael can now read websites and PDFs!
    source = "https://arxiv.org/pdf/2408.09869" # A random AI paper
    converter = DocumentConverter()
    result = converter.convert(source)
    print(result.document.export_to_markdown()[:500]) # Print first 500 chars

if __name__ == "__main__":
    test_read()