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, IncludeImages, IncludeLinks, Ocr, ShortenBase64Images, UseMainContentOnly, Zdr Classes: Pdf
Constant Summary
Constants included from Internal::Type::RequestParameters
Internal::Type::RequestParameters::ContextDev
Instance Attribute Summary collapse
- #body ⇒ Pathname, ...
-
#client ⇒ String?
Optional client identifier used for usage attribution.
-
#extension ⇒ Symbol, ...
Optional file extension hint, such as pdf, docx, xlsx, pptx, html, json, csv, md, py, rtf, jpg, png, or txt.
-
#include_images ⇒ Boolean, ...
Include image references in Markdown output.
-
#include_links ⇒ Boolean, ...
Preserve hyperlinks in Markdown output.
-
#ocr ⇒ Boolean, ...
When true for PDF inputs, detect and OCR images embedded in the selected pages, inserting recognized text at each image's position in page reading order while preserving the PDF text layer.
-
#pdf ⇒ ContextDev::Models::ParseHandleParams::Pdf?
PDF page-range options as a JSON object, e.g.
-
#shorten_base64_images ⇒ Boolean, ...
Shorten base64-encoded image data in the Markdown output.
-
#tags ⇒ Array<String>?
Optional comma-separated caller-defined tags for tracking this request.
-
#use_main_content_only ⇒ Boolean, ...
Extract only the main content from HTML-like inputs.
-
#zdr ⇒ Symbol, ...
Set to enabled to bypass shared caches and omit request and response content from retained usage logs.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(end_: nil, start: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Pdf 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(end_: nil, start: nil) ⇒ Object
Some parameter documentations has been truncated, see Pdf for more details.
PDF page-range options as a JSON object, e.g. 2, "end": 5.
|
|
# File 'lib/context_dev/models/parse_handle_params.rb', line 84
|
Instance Attribute Details
#body ⇒ Pathname, ...
13 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 13 required :body, ContextDev::Internal::Type::FileInput |
#client ⇒ String?
Optional client identifier used for usage attribution.
19 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 19 optional :client, String |
#extension ⇒ Symbol, ...
Optional file extension hint, such as pdf, docx, xlsx, pptx, html, json, csv, md, py, rtf, jpg, png, or txt.
26 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 26 optional :extension, enum: -> { ContextDev::ParseHandleParams::Extension } |
#include_images ⇒ Boolean, ...
Include image references in Markdown output
32 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 32 optional :include_images, union: -> { ContextDev::ParseHandleParams::IncludeImages } |
#include_links ⇒ Boolean, ...
Preserve hyperlinks in Markdown output
38 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 38 optional :include_links, union: -> { ContextDev::ParseHandleParams::IncludeLinks } |
#ocr ⇒ Boolean, ...
When true for PDF inputs, detect and OCR images embedded in the selected pages, inserting recognized text at each image's position in page reading order while preserving the PDF text layer. pdf.start/pdf.end limit the inclusive page range. When false, all OCR is disabled, including the automatic scanned-PDF fallback.
47 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 47 optional :ocr, union: -> { ContextDev::ParseHandleParams::Ocr } |
#pdf ⇒ ContextDev::Models::ParseHandleParams::Pdf?
PDF page-range options as a JSON object, e.g. 2, "end": 5.
53 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 53 optional :pdf, -> { ContextDev::ParseHandleParams::Pdf } |
#shorten_base64_images ⇒ Boolean, ...
Shorten base64-encoded image data in the Markdown output
59 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 59 optional :shorten_base64_images, union: -> { ContextDev::ParseHandleParams::ShortenBase64Images } |
#tags ⇒ Array<String>?
Optional comma-separated caller-defined tags for tracking this request. Tags are recorded on the request's usage log and can be used to filter usage on the dashboard usage page. Up to 20 tags, each 1-50 characters.
67 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 67 optional :tags, ContextDev::Internal::Type::ArrayOf[String] |
#use_main_content_only ⇒ Boolean, ...
Extract only the main content from HTML-like inputs
73 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 73 optional :use_main_content_only, union: -> { ContextDev::ParseHandleParams::UseMainContentOnly } |
#zdr ⇒ Symbol, ...
Set to enabled to bypass shared caches and omit request and response content from retained usage logs. Requires zero data retention to be enabled for your organization (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.
82 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 82 optional :zdr, enum: -> { ContextDev::ParseHandleParams::Zdr } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/context_dev/models/parse_handle_params.rb', line 188
|
Instance Method Details
#to_hash ⇒ {
96 |
# File 'sig/context_dev/models/parse_handle_params.rbs', line 96
def to_hash: -> {
|