Package nl.dannyj.mistral.models.ocr
Class OCRRequest.OCRRequestBuilder
java.lang.Object
nl.dannyj.mistral.models.ocr.OCRRequest.OCRRequestBuilder
- Enclosing class:
- OCRRequest
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
document
(ContentChunk document) Document to run OCR on.Optional ID for the request.imageLimit
(Integer imageLimit) Maximum images to extract.imageMinSize
(Integer imageMinSize) Minimum height and width of image to extract.includeImageBase64
(Boolean includeImageBase64) Include image URLs in response.ID of the model to use.Specific pages user wants to process in various formats: single number, range, or list of both.toString()
-
Method Details
-
model
ID of the model to use.- Parameters:
model
- The model's ID. Can't be null.- Returns:
this
.
-
id
Optional ID for the request.- Parameters:
id
- The optional ID for the request.- Returns:
this
.
-
document
Document to run OCR on. Can be a DocumentURLChunk or an ImageURLChunk.- Parameters:
document
- The document to run OCR on. Can be aDocumentURLChunk
or anImageURLChunk
. Can't be null.- Returns:
this
.
-
pages
Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0.- Parameters:
pages
- A list of specific page indices to process. Starts from 0. Null to process all pages.- Returns:
this
.
-
includeImageBase64
Include image URLs in response.- Parameters:
includeImageBase64
- Whether to include image URLs in the response. Null for default behavior.- Returns:
this
.
-
imageLimit
Maximum images to extract.- Parameters:
imageLimit
- The maximum number of images to extract. Null for default behavior.- Returns:
this
.
-
imageMinSize
Minimum height and width of image to extract.- Parameters:
imageMinSize
- The minimum height and width of images to extract. Null for default behavior.- Returns:
this
.
-
build
-
toString
-