Record Class MistralOcrApi.OCRRequest
java.lang.Object
java.lang.Record
org.springframework.ai.mistralai.ocr.MistralOcrApi.OCRRequest
- Record Components:
model- Model to use for OCR. Can be 'mistral-ocr-latest'id- An optional string identifier.document- Document to run OCR on. Can be either aMistralOcrApi.OCRRequest.DocumentURLChunkor anMistralOcrApi.OCRRequest.ImageURLChunk.pages- Specific pages to process in various formats: single number, range, or list of both. Starts from 0.includeImageBase64- Whether to include image URLs in the response.imageLimit- Maximum number of images to extract.imageMinSize- Minimum height and width of image to extract.
- Enclosing class:
- MistralOcrApi
public static record MistralOcrApi.OCRRequest(String model, String id, MistralOcrApi.OCRRequest.Document document, List<Integer> pages, Boolean includeImageBase64, Integer imageLimit, Integer imageMinSize)
extends Record
Represents the request for the OCR API.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceRepresents the document to be processed, which can be either a document URL or an image URL.static final recordRepresents a document URL chunk.static final recordRepresents an image URL chunk. -
Constructor Summary
ConstructorsConstructorDescriptionOCRRequest(String model, String id, MistralOcrApi.OCRRequest.Document document, List<Integer> pages, Boolean includeImageBase64, Integer imageLimit, Integer imageMinSize) Creates an instance of aOCRRequestrecord class.OCRRequest(String model, MistralOcrApi.OCRRequest.Document document) Create an OCRRequest. -
Method Summary
Modifier and TypeMethodDescriptiondocument()Returns the value of thedocumentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theimageLimitrecord component.Returns the value of theimageMinSizerecord component.Returns the value of theincludeImageBase64record component.model()Returns the value of themodelrecord component.pages()Returns the value of thepagesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OCRRequest
Create an OCRRequest.- Parameters:
model- The model to use for OCR.document- Document to run OCR on.
-
OCRRequest
public OCRRequest(String model, String id, MistralOcrApi.OCRRequest.Document document, List<Integer> pages, Boolean includeImageBase64, Integer imageLimit, Integer imageMinSize) Creates an instance of aOCRRequestrecord class.- Parameters:
model- the value for themodelrecord componentid- the value for theidrecord componentdocument- the value for thedocumentrecord componentpages- the value for thepagesrecord componentincludeImageBase64- the value for theincludeImageBase64record componentimageLimit- the value for theimageLimitrecord componentimageMinSize- the value for theimageMinSizerecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
document
Returns the value of thedocumentrecord component.- Returns:
- the value of the
documentrecord component
-
pages
Returns the value of thepagesrecord component.- Returns:
- the value of the
pagesrecord component
-
includeImageBase64
Returns the value of theincludeImageBase64record component.- Returns:
- the value of the
includeImageBase64record component
-
imageLimit
Returns the value of theimageLimitrecord component.- Returns:
- the value of the
imageLimitrecord component
-
imageMinSize
Returns the value of theimageMinSizerecord component.- Returns:
- the value of the
imageMinSizerecord component
-