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, OCR the selected pages that have no usable text layer (scans), replacing each recovered page's text with the OCR result while pages with a real text layer keep it.
-
#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 85
|
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, OCR the selected pages that have no usable text layer (scans), replacing each recovered page's text with the OCR result while pages with a real text layer keep it. pdf.start/pdf.end limit the inclusive page range. Billed at 1 credit per page OCR actually recovered, on top of the base request cost. When false, no OCR runs.
48 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 48 optional :ocr, union: -> { ContextDev::ParseHandleParams::Ocr } |
#pdf ⇒ ContextDev::Models::ParseHandleParams::Pdf?
PDF page-range options as a JSON object, e.g. 2, "end": 5.
54 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 54 optional :pdf, -> { ContextDev::ParseHandleParams::Pdf } |
#shorten_base64_images ⇒ Boolean, ...
Shorten base64-encoded image data in the Markdown output
60 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 60 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.
68 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 68 optional :tags, ContextDev::Internal::Type::ArrayOf[String] |
#use_main_content_only ⇒ Boolean, ...
Extract only the main content from HTML-like inputs
74 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 74 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.
83 |
# File 'lib/context_dev/models/parse_handle_params.rb', line 83 optional :zdr, enum: -> { ContextDev::ParseHandleParams::Zdr } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/context_dev/models/parse_handle_params.rb', line 189
|
Instance Method Details
#to_hash ⇒ {
96 |
# File 'sig/context_dev/models/parse_handle_params.rbs', line 96
def to_hash: -> {
|