This commit is contained in:
16
docs/snippets/python/config/config_discover.md
Normal file
16
docs/snippets/python/config/config_discover.md
Normal file
@@ -0,0 +1,16 @@
|
||||
```python title="Python"
|
||||
import asyncio
|
||||
from kreuzberg import ExtractionConfig, extract_file
|
||||
|
||||
async def main() -> None:
|
||||
config: ExtractionConfig = ExtractionConfig()
|
||||
result = await extract_file("document.pdf", config=config)
|
||||
|
||||
content: str = result.content
|
||||
content_preview: str = content[:100]
|
||||
|
||||
print(f"Content preview: {content_preview}")
|
||||
print(f"Total length: {len(content)}")
|
||||
|
||||
asyncio.run(main())
|
||||
```
|
||||
Reference in New Issue
Block a user