Class VLMOCRConfig

java.lang.Object
org.apache.tika.parser.vlm.VLMOCRConfig
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
VLMOCRConfig.RuntimeConfig

public class VLMOCRConfig extends Object implements Serializable
Configuration for VLMOCRParser.

The parser expects an OpenAI-compatible chat completions endpoint (e.g. from vLLM, Ollama, or a local FastAPI server). The image is base64-encoded and sent as a image_url content part.

This class is not thread safe and must be synchronized externally.

See Also:
  • Constructor Details

    • VLMOCRConfig

      public VLMOCRConfig()
  • Method Details

    • getBaseUrl

      public String getBaseUrl()
    • setBaseUrl

      public void setBaseUrl(String baseUrl) throws TikaConfigException
      Throws:
      TikaConfigException
    • getCompletionsPath

      public String getCompletionsPath()
    • setCompletionsPath

      public void setCompletionsPath(String completionsPath)
    • getModel

      public String getModel()
    • setModel

      public void setModel(String model)
    • getPrompt

      public String getPrompt()
    • setPrompt

      public void setPrompt(String prompt)
    • getMaxTokens

      public int getMaxTokens()
    • setMaxTokens

      public void setMaxTokens(int maxTokens)
    • getTimeoutSeconds

      public int getTimeoutSeconds()
    • setTimeoutSeconds

      public void setTimeoutSeconds(int timeoutSeconds)
    • getApiKey

      public String getApiKey()
    • setApiKey

      public void setApiKey(String apiKey) throws TikaConfigException
      Throws:
      TikaConfigException
    • isInlineContent

      public boolean isInlineContent()
    • setInlineContent

      public void setInlineContent(boolean inlineContent)
    • isSkipOcr

      public boolean isSkipOcr()
    • setSkipOcr

      public void setSkipOcr(boolean skipOcr)
    • getMinFileSizeToOcr

      public long getMinFileSizeToOcr()
    • setMinFileSizeToOcr

      public void setMinFileSizeToOcr(long minFileSizeToOcr)
    • getMaxFileSizeToOcr

      public long getMaxFileSizeToOcr()
    • setMaxFileSizeToOcr

      public void setMaxFileSizeToOcr(long maxFileSizeToOcr)
    • getMaxImagePixels

      public long getMaxImagePixels()
    • setMaxImagePixels

      public void setMaxImagePixels(long maxImagePixels)
      Set the maximum total pixels (width × height) for an image. Default is 100,000,000. Set to -1 for no limit (not recommended).
    • isAllowRuntimePrompt

      public boolean isAllowRuntimePrompt()
    • setAllowRuntimePrompt

      public void setAllowRuntimePrompt(boolean allowRuntimePrompt)