Class: Pdf2MarkdownOCR::Configuration
- Inherits:
-
Object
- Object
- Pdf2MarkdownOCR::Configuration
- Defined in:
- lib/pdf2markdownOCR/configuration.rb
Constant Summary collapse
- VALID_MODES =
%i[single_thread multi_thread].freeze
Instance Attribute Summary collapse
-
#llm_api_url ⇒ Object
Returns the value of attribute llm_api_url.
-
#llm_model ⇒ Object
Returns the value of attribute llm_model.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#png_dpi_resolution ⇒ Object
Returns the value of attribute png_dpi_resolution.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/pdf2markdownOCR/configuration.rb', line 18 def initialize @llm_api_url = ENV['LLM_API_URL'] || "http://localhost:8000" @llm_model = ENV['LLM_MODEL'] || "deepseek-ai/DeepSeek-OCR-2" @png_dpi_resolution = ENV['PNG_DPI'] || 300 @mode = :multi_thread @logger = Logger.new($stdout).tap do |log| log.progname = self.class.name.split('::').first end end |
Instance Attribute Details
#llm_api_url ⇒ Object
Returns the value of attribute llm_api_url.
6 7 8 |
# File 'lib/pdf2markdownOCR/configuration.rb', line 6 def llm_api_url @llm_api_url end |
#llm_model ⇒ Object
Returns the value of attribute llm_model.
6 7 8 |
# File 'lib/pdf2markdownOCR/configuration.rb', line 6 def llm_model @llm_model end |
#logger ⇒ Object
Returns the value of attribute logger.
6 7 8 |
# File 'lib/pdf2markdownOCR/configuration.rb', line 6 def logger @logger end |
#mode ⇒ Object
Returns the value of attribute mode.
9 10 11 |
# File 'lib/pdf2markdownOCR/configuration.rb', line 9 def mode @mode end |
#png_dpi_resolution ⇒ Object
Returns the value of attribute png_dpi_resolution.
6 7 8 |
# File 'lib/pdf2markdownOCR/configuration.rb', line 6 def png_dpi_resolution @png_dpi_resolution end |