-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
Add documentation and examples for custom plugin development
Docling supports custom plugins for extending functionality, but there's minimal documentation on how to create and integrate them into the pipeline.
Current gap: Users need to examine source code to understand how to extend components like image describers, table structure recognizers, or OCR backends. This makes it difficult to implement custom functionality (e.g., capturing API token usage as in issue #2271).
Requested improvements:
Documentation:
- Add a "Custom Plugins" section to the official docs
- Document the base plugin interfaces and registration methods
- Include guidelines on plugin structure and packaging
Examples:
- Show how to extend
BaseImageDescriberor similar components - Demonstrate registering custom plugins with
DocumentConverter - Provide a complete example plugin (e.g., one that captures telemetry data)
Reference implementation: A working example could show token usage tracking, which could serve as a template.
This would make Docling more extensible without users needing to fork the core library or reverse-engineer built-in plugins.
Alternatives
- Users examine built-in plugin source code (time-consuming)
- Community examples exist but are scattered
- Forking Docling directly (not maintainable)
Official documentation and examples would provide a sustainable path for extending Docling's capabilities.