models
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| ChunkOut docler_api.models A chunk of the document; its images are in the response's `images`. |
||
| ConvertResponse docler_api.models Response of `/v1/convert`: each image once, chunks only when a chunker was given. |
||
| DocumentOut docler_api.models The converted document, without its images (they are in the response's `images`). |
||
| ImageOut docler_api.models An image of the document; markdown references it by `filename` (or `id`). |
🛈 DocStrings¶
Response models of the Docler API.
ChunkOut
¶
Bases: BaseModel
A chunk of the document; its images are in the response's images.
Source code in src/docler_api/models.py
ConvertResponse
¶
Bases: BaseModel
Response of /v1/convert: each image once, chunks only when a chunker was given.
Source code in src/docler_api/models.py
DocumentOut
¶
Bases: BaseModel
The converted document, without its images (they are in the response's images).
Source code in src/docler_api/models.py
ImageOut
¶
Bases: BaseModel
An image of the document; markdown references it by filename (or id).
Source code in src/docler_api/models.py
content
class-attribute
instance-attribute
¶
Base64 image data; None with images=none.
build_response
¶
build_response(
document: Document, chunks: list[TextChunk] | None, images: ImagesMode
) -> ConvertResponse
Assemble the response, listing every image once (by id).