-
Notifications
You must be signed in to change notification settings - Fork 10
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
Updates for docling-serve #12
Comments
@dolfim-ibm @guimou @nerdalert For the community UI usecase, we will need (in long term) these API's to be async. We have two options
I am more inclined toward 1) so that we can avoid api explosion, but i do see some use cases where having a sync api can be helpful, like writing simple CLI client or simple demo scripts that uses docling-serve for doc conversion. What are your thoughts? |
Asyncs APIs will require some more thinking depending how you want to work. Two different avenues:
In both cases, you can implement a queue system, with feedback on where you are in the queue, and eventually the progress of the conversion (if/when docling provides such data). Anyway, directly to your questions @vishnoianil:
That's not what I would start with as it's more complicated to consume (from a client perspective). Let's start by offering a sync API, then add async endpoints.
That's where I would go, using both Websockets and "standard" status as it's not that much more implementation. As we discussed, my current implementation offers two endpoint for processing url(s) and file(s). We seemed to agree to continue it this way. So here is the API map I am proposing (I am adding a v1 prefix to allow for organized non-breaking evolution in the future):
In both cases, the client can specify each option available in the docling CLI, plus some outputs options (direct markdown, files in a zip). Options are currently:
Above is doable almost immediately (give me 1-2 days after we agree, this project is unfortunately not on the top of my list). In a second phase I would introduce the async endpoints:
Waiting for comments/approval to go on. |
Makes sense to me. I think sync api -> async-api (with client polling) -> async-api (with websocket), seems like a reasonable evolution plan.
Sounds good. I think major issue with any async apis is the scaling of the apis. Running multiple instances of the docling + api server etc might need some more work. But i believe that's not our day 1 problem at this point of time, but something to keep in back of our mind.
This looks good to me, minor suggestion, can be use
I think the following url might be more cleaner : But i think we can take the async api discussion through different issues.
Details for the sync api's looks good to me. so +1 from me. |
@vishnoianil Thanks for the feedback. I'm going on with this plan then. |
Taking a look at some of the response options for |
Here are updates coming for docling-serve.
Updates to the latest docling v2. New input and output formats, better processing, more options.
Richer endpoints. The new options in docling allow for a richer API, for example:
Input options. Both endpoint will accept the following payload
Persistent DocumentConverter. To avoid reloading models all the time, we should keep a global
DocumentConverter
initialized. However, the initialization of the class will set options like which OCR engine, i.e. we want to add a cache for multipleDocumentConverter
one for each common set of input options.The text was updated successfully, but these errors were encountered: