Class: ContextDev::Models::ParseHandleParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ContextDev::Models::ParseHandleParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/context_dev/models/parse_handle_params.rb,
sig/context_dev/models/parse_handle_params.rbs
Overview
Defined Under Namespace
Modules: Extension Classes: Pdf
Constant Summary
Constants included from Internal::Type::RequestParameters
Internal::Type::RequestParameters::ContextDev
Instance Attribute Summary collapse
- #body ⇒ Pathname, ...
-
#extension ⇒ Symbol, ...
Optional file extension hint.
-
#include_images ⇒ Boolean?
Include image references in Markdown output.
-
#include_links ⇒ Boolean?
Preserve hyperlinks in Markdown output.
-
#ocr ⇒ Boolean?
Gates all OCR.
-
#pdf ⇒ ContextDev::Models::ParseHandleParams::Pdf?
PDF page-range controls.
-
#shorten_base64_images ⇒ Boolean?
Shorten base64-encoded image data in the Markdown output.
-
#use_main_content_only ⇒ Boolean?
Extract only the main content from HTML-like inputs.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(body:, extension: nil, include_images: nil, include_links: nil, ocr: nil, pdf: nil, shorten_base64_images: nil, use_main_content_only: nil, request_options: {}) ⇒ Object
constructor
Some parameter documentations has been truncated, see ParseHandleParams for more details.
- #to_hash ⇒ {
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(body:, extension: nil, include_images: nil, include_links: nil, ocr: nil, pdf: nil, shorten_base64_images: nil, use_main_content_only: nil, request_options: {}) ⇒ Object
Some parameter documentations has been truncated, see ContextDev::Models::ParseHandleParams for more details.
|
|
# File 'lib/context_dev/models/parse_handle_params.rb', line 65
|
Instance Attribute Details
#body ⇒ Pathname, ...
13 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 13 required :body, ContextDev::Internal::Type::FileInput |
#extension ⇒ Symbol, ...
Optional file extension hint. Case-insensitive; a leading dot is accepted (e.g. ".pdf").
20 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 20 optional :extension, enum: -> { ContextDev::ParseHandleParams::Extension } |
#include_images ⇒ Boolean?
Include image references in Markdown output
26 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 26 optional :include_images, ContextDev::Internal::Type::Boolean |
#include_links ⇒ Boolean?
Preserve hyperlinks in Markdown output
32 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 32 optional :include_links, ContextDev::Internal::Type::Boolean |
#ocr ⇒ Boolean?
Gates all OCR. When true, PDFs get embedded-image OCR (recognized text inserted at each image's position in page reading order, preserving the text layer; pdf.start/pdf.end limit the page range), scanned PDFs with no text layer get full-document OCR, and raster images get their visible text transcribed. When false, no OCR runs: scanned PDFs may yield no content and images return only format/dimension metadata. Calls where OCR actually runs cost 5 credits instead of 1.
44 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 44 optional :ocr, ContextDev::Internal::Type::Boolean |
#pdf ⇒ ContextDev::Models::ParseHandleParams::Pdf?
PDF page-range controls. Use start/end to limit parsing (and OCR when ocr=true) to an inclusive 1-based page range.
51 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 51 optional :pdf, -> { ContextDev::ParseHandleParams::Pdf } |
#shorten_base64_images ⇒ Boolean?
Shorten base64-encoded image data in the Markdown output
57 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 57 optional :shorten_base64_images, ContextDev::Internal::Type::Boolean |
#use_main_content_only ⇒ Boolean?
Extract only the main content from HTML-like inputs
63 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 63 optional :use_main_content_only, ContextDev::Internal::Type::Boolean |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/context_dev/models/parse_handle_params.rb', line 163
|
Instance Method Details
#to_hash ⇒ {
66 |
# File 'sig/context_dev/models/parse_handle_params.rbs', line 66
def to_hash: -> {
|