-
Notifications
You must be signed in to change notification settings - Fork 2.9k
docs(custom-plugins): retrieve TOKEN USAGE for Image Processing with Custom PictureDescriptionApiModel #2403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
docs(custom-plugins): retrieve TOKEN USAGE for Image Processing with Custom PictureDescriptionApiModel #2403
Conversation
✅ DCO Check Passed Thanks @FrigaZzz, all your commits are properly signed off. 🎉 |
Related Documentation Checked 2 published document(s). No updates required. You have 5 draft document(s). Publish docs to keep them always up-to-date |
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
4b34203
to
065ae9c
Compare
065ae9c
to
0610d01
Compare
…n usage Signed-off-by: FrigaZzz <[email protected]>
@FrigaZzz do you have a specific motivation for adding the token usage as a plugin example and not as an enhancement of the current model runtime? While having a first look, my thinking is
|
Yes, exactly! I mainly wanted to showcase how to build these custom plugins, since we had some trouble configuring them last week for telemetry. I purposely decided to extend the base classes while still keeping the same instance members, that’s on me. I can definitely work out another PR extending the current PictureDescriptionApiOptions-related workflow. I’ll include the feature there and update the docs with an example on how to use it. |
- Rewrites the example plugin section to streamline setup: - Clear install and run steps (pip install -e and main.py driver) - Clarifies enabling external plugins (CLI and programmatic) - Updates file names/paths and entry-point guidance; fixes/updates links (e.g., options filename, quick links to example package in repo) Signed-off-by: FrigaZzz <[email protected]>
09572f8
to
cb09f07
Compare
I've simplified it to derive from the current picture description runtime so we only override what's necessary:
This keeps the plugin minimal and focused on demonstrating the feature rather than re‑implementing the runtime. Core integration (#2445)I also prepared #2445 to integrate usage directly into the framework. The challenge:
#2445 uses a temporary Current status:
How can we proceed? |
Issues resolved by this Pull Request:
Resolves #2402
Resolves #2271
Description:
This PR adds guidance and a working example for creating custom Docling plugins, helping users understand how to extend Docling’s functionality.
Key changes include:
Documentation additions:
Example plugin implementation:
This equips users with a clear reference implementation to extend Docling without modifying the core code.
Checklist: