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 a MistralOcrApi.OCRRequest.DocumentURLChunk or an MistralOcrApi.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.
  • Constructor Details

  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • model

      public String model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • document

      Returns the value of the document record component.
      Returns:
      the value of the document record component
    • pages

      public List<Integer> pages()
      Returns the value of the pages record component.
      Returns:
      the value of the pages record component
    • includeImageBase64

      public Boolean includeImageBase64()
      Returns the value of the includeImageBase64 record component.
      Returns:
      the value of the includeImageBase64 record component
    • imageLimit

      public Integer imageLimit()
      Returns the value of the imageLimit record component.
      Returns:
      the value of the imageLimit record component
    • imageMinSize

      public Integer imageMinSize()
      Returns the value of the imageMinSize record component.
      Returns:
      the value of the imageMinSize record component