context.dev 2.20.0 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +1 -1
- data/lib/context_dev/client.rb +6 -0
- data/lib/context_dev/models/feedback_submit_params.rb +73 -0
- data/lib/context_dev/models/feedback_submit_response.rb +68 -0
- data/lib/context_dev/models/news_search_params.rb +13 -6
- data/lib/context_dev/models/web_scrape_params.rb +36 -30
- data/lib/context_dev/models/web_scrape_response.rb +114 -37
- data/lib/context_dev/models.rb +2 -0
- data/lib/context_dev/resources/feedback.rb +50 -0
- data/lib/context_dev/resources/news.rb +8 -4
- data/lib/context_dev/resources/web.rb +15 -9
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +3 -0
- data/rbi/context_dev/client.rbi +5 -0
- data/rbi/context_dev/models/feedback_submit_params.rbi +133 -0
- data/rbi/context_dev/models/feedback_submit_response.rbi +122 -0
- data/rbi/context_dev/models/news_search_params.rbi +12 -6
- data/rbi/context_dev/models/web_scrape_params.rbi +55 -46
- data/rbi/context_dev/models/web_scrape_response.rbi +183 -69
- data/rbi/context_dev/models.rbi +2 -0
- data/rbi/context_dev/resources/feedback.rbi +42 -0
- data/rbi/context_dev/resources/news.rbi +7 -4
- data/rbi/context_dev/resources/web.rbi +26 -17
- data/sig/context_dev/client.rbs +2 -0
- data/sig/context_dev/models/feedback_submit_params.rbs +73 -0
- data/sig/context_dev/models/feedback_submit_response.rbs +58 -0
- data/sig/context_dev/models/web_scrape_response.rbs +81 -27
- data/sig/context_dev/models.rbs +2 -0
- data/sig/context_dev/resources/feedback.rbs +16 -0
- metadata +11 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 00b5d7dcb52a04ff3be4b212cbf64f01fa8728ea160adebf5cedc9f2c98b1680
|
|
4
|
+
data.tar.gz: 492420d10233d6bce72fca4f6ee94a4600892cedaa4e833658c30776480da726
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7327c49a078d92775d9446f89c314bf72ccdad01f510321a305238a4f151751e03135ce864a4bc78085605c1c6432edf1b5f311441940cff4b960b5834acf80b
|
|
7
|
+
data.tar.gz: c6496a4bc18352abf4d13cc52f321982c79d14ab1d0652eafa7e44be273ede98b2a1f2f1f9721f155b0cc540c9f38c6db16b6f2f5e1a94e9e82781ffb8330d9c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.21.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.20.0...v2.21.0) (2026-09-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **feedback:** add agent feedback endpoint ([#1322](https://github.com/context-dot-dev/context-ruby-sdk/issues/1322)) ([f3a9dce](https://github.com/context-dot-dev/context-ruby-sdk/commit/f3a9dce10e0f8a20977d0133e387fe20a9e11d18))
|
|
9
|
+
* **highlights:** preserve Markdown structure in scrape excerpts ([#1236](https://github.com/context-dot-dev/context-ruby-sdk/issues/1236)) ([d3c383a](https://github.com/context-dot-dev/context-ruby-sdk/commit/d3c383a7ccfcea00a01c9c85955d62e871227ceb))
|
|
10
|
+
* **scrape:** enable highlights with zero data retention ([#1246](https://github.com/context-dot-dev/context-ruby-sdk/issues/1246)) ([487a289](https://github.com/context-dot-dev/context-ruby-sdk/commit/487a2897d19d15d5164d0e69c2700f511b223216))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **openapi:** document exclusive news filters ([#1265](https://github.com/context-dot-dev/context-ruby-sdk/issues/1265)) ([5b7c79d](https://github.com/context-dot-dev/context-ruby-sdk/commit/5b7c79de83fd209760bfb5738670229024480206))
|
|
16
|
+
* **scrape:** only flag partial success when a requested format succeeds ([#1325](https://github.com/context-dot-dev/context-ruby-sdk/issues/1325)) ([1120d93](https://github.com/context-dot-dev/context-ruby-sdk/commit/1120d9344525c6fc1ffb60403df75790ea6bbf1c))
|
|
17
|
+
* **scrape:** preserve successful formats when other outputs fail ([#1263](https://github.com/context-dot-dev/context-ruby-sdk/issues/1263)) ([e2ccfa7](https://github.com/context-dot-dev/context-ruby-sdk/commit/e2ccfa7ea613221d3c6ad755aec93e01c58ca402))
|
|
18
|
+
* **scrape:** retain highlight headings only when needed ([#1245](https://github.com/context-dot-dev/context-ruby-sdk/issues/1245)) ([492a305](https://github.com/context-dot-dev/context-ruby-sdk/commit/492a3058c77fd4d2edad2be9007c010e1745cfc9))
|
|
19
|
+
|
|
3
20
|
## [2.20.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.19.0...v2.20.0) (2026-09-23)
|
|
4
21
|
|
|
5
22
|
|
data/README.md
CHANGED
data/lib/context_dev/client.rb
CHANGED
|
@@ -59,6 +59,11 @@ module ContextDev
|
|
|
59
59
|
# @return [ContextDev::Resources::Logs]
|
|
60
60
|
attr_reader :logs
|
|
61
61
|
|
|
62
|
+
# Report bugs, docs mismatches, and friction with any Context.dev API. Submissions
|
|
63
|
+
# cost no credits and use a separate rate limit.
|
|
64
|
+
# @return [ContextDev::Resources::Feedback]
|
|
65
|
+
attr_reader :feedback
|
|
66
|
+
|
|
62
67
|
# @api private
|
|
63
68
|
#
|
|
64
69
|
# @return [Hash{String=>String}]
|
|
@@ -131,6 +136,7 @@ module ContextDev
|
|
|
131
136
|
@people = ContextDev::Resources::People.new(client: self)
|
|
132
137
|
@news = ContextDev::Resources::News.new(client: self)
|
|
133
138
|
@logs = ContextDev::Resources::Logs.new(client: self)
|
|
139
|
+
@feedback = ContextDev::Resources::Feedback.new(client: self)
|
|
134
140
|
end
|
|
135
141
|
end
|
|
136
142
|
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Feedback#submit
|
|
6
|
+
class FeedbackSubmitParams < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ContextDev::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute category
|
|
11
|
+
# Kind of issue.
|
|
12
|
+
#
|
|
13
|
+
# @return [Symbol, ContextDev::Models::FeedbackSubmitParams::Category]
|
|
14
|
+
required :category, enum: -> { ContextDev::FeedbackSubmitParams::Category }
|
|
15
|
+
|
|
16
|
+
# @!attribute note
|
|
17
|
+
# What went wrong and what you expected instead.
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :note, String
|
|
21
|
+
|
|
22
|
+
# @!attribute request_id
|
|
23
|
+
# The request_id of the API call the feedback is about, from its response body or
|
|
24
|
+
# X-Request-Id header.
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
optional :request_id, String
|
|
28
|
+
|
|
29
|
+
# @!attribute tags
|
|
30
|
+
# Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
|
|
31
|
+
#
|
|
32
|
+
# @return [Array<String>, nil]
|
|
33
|
+
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
34
|
+
|
|
35
|
+
# @!attribute url
|
|
36
|
+
# The page the feedback is about, such as one page of a crawl or a docs page.
|
|
37
|
+
#
|
|
38
|
+
# @return [String, nil]
|
|
39
|
+
optional :url, String
|
|
40
|
+
|
|
41
|
+
# @!method initialize(category:, note:, request_id: nil, tags: nil, url: nil, request_options: {})
|
|
42
|
+
# Some parameter documentations has been truncated, see
|
|
43
|
+
# {ContextDev::Models::FeedbackSubmitParams} for more details.
|
|
44
|
+
#
|
|
45
|
+
# @param category [Symbol, ContextDev::Models::FeedbackSubmitParams::Category] Kind of issue.
|
|
46
|
+
#
|
|
47
|
+
# @param note [String] What went wrong and what you expected instead.
|
|
48
|
+
#
|
|
49
|
+
# @param request_id [String] The request_id of the API call the feedback is about, from its response body or
|
|
50
|
+
#
|
|
51
|
+
# @param tags [Array<String>] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
|
|
52
|
+
#
|
|
53
|
+
# @param url [String] The page the feedback is about, such as one page of a crawl or a docs page.
|
|
54
|
+
#
|
|
55
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
56
|
+
|
|
57
|
+
# Kind of issue.
|
|
58
|
+
module Category
|
|
59
|
+
extend ContextDev::Internal::Type::Enum
|
|
60
|
+
|
|
61
|
+
BUG = :bug
|
|
62
|
+
DOCS_MISMATCH = :docs_mismatch
|
|
63
|
+
FRICTION = :friction
|
|
64
|
+
FEATURE_GAP = :feature_gap
|
|
65
|
+
QUALITY_DEGRADATION = :quality_degradation
|
|
66
|
+
OTHER = :other
|
|
67
|
+
|
|
68
|
+
# @!method self.values
|
|
69
|
+
# @return [Array<Symbol>]
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Feedback#submit
|
|
6
|
+
class FeedbackSubmitResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute already_submitted
|
|
8
|
+
# True when feedback for this request_id was already recorded; the original
|
|
9
|
+
# feedback_id is returned.
|
|
10
|
+
#
|
|
11
|
+
# @return [Boolean]
|
|
12
|
+
required :already_submitted, ContextDev::Internal::Type::Boolean
|
|
13
|
+
|
|
14
|
+
# @!attribute feedback_id
|
|
15
|
+
# ID of the stored feedback.
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :feedback_id, String
|
|
19
|
+
|
|
20
|
+
# @!attribute request_id
|
|
21
|
+
# Unique id of this API call, also sent in the X-Request-Id response header. Quote
|
|
22
|
+
# it when contacting support about a failed request.
|
|
23
|
+
#
|
|
24
|
+
# @return [String]
|
|
25
|
+
required :request_id, String
|
|
26
|
+
|
|
27
|
+
# @!attribute key_metadata
|
|
28
|
+
# Credit usage, included whenever a valid API key is provided.
|
|
29
|
+
#
|
|
30
|
+
# @return [ContextDev::Models::FeedbackSubmitResponse::KeyMetadata, nil]
|
|
31
|
+
optional :key_metadata, -> { ContextDev::Models::FeedbackSubmitResponse::KeyMetadata }
|
|
32
|
+
|
|
33
|
+
# @!method initialize(already_submitted:, feedback_id:, request_id:, key_metadata: nil)
|
|
34
|
+
# Some parameter documentations has been truncated, see
|
|
35
|
+
# {ContextDev::Models::FeedbackSubmitResponse} for more details.
|
|
36
|
+
#
|
|
37
|
+
# @param already_submitted [Boolean] True when feedback for this request_id was already recorded; the original feedba
|
|
38
|
+
#
|
|
39
|
+
# @param feedback_id [String] ID of the stored feedback.
|
|
40
|
+
#
|
|
41
|
+
# @param request_id [String] Unique id of this API call, also sent in the X-Request-Id response header. Quote
|
|
42
|
+
#
|
|
43
|
+
# @param key_metadata [ContextDev::Models::FeedbackSubmitResponse::KeyMetadata] Credit usage, included whenever a valid API key is provided.
|
|
44
|
+
|
|
45
|
+
# @see ContextDev::Models::FeedbackSubmitResponse#key_metadata
|
|
46
|
+
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
47
|
+
# @!attribute credits_consumed
|
|
48
|
+
# Credits used by this request.
|
|
49
|
+
#
|
|
50
|
+
# @return [Integer]
|
|
51
|
+
required :credits_consumed, Integer
|
|
52
|
+
|
|
53
|
+
# @!attribute credits_remaining
|
|
54
|
+
# Credits remaining for your organization.
|
|
55
|
+
#
|
|
56
|
+
# @return [Integer]
|
|
57
|
+
required :credits_remaining, Integer
|
|
58
|
+
|
|
59
|
+
# @!method initialize(credits_consumed:, credits_remaining:)
|
|
60
|
+
# Credit usage, included whenever a valid API key is provided.
|
|
61
|
+
#
|
|
62
|
+
# @param credits_consumed [Integer] Credits used by this request.
|
|
63
|
+
#
|
|
64
|
+
# @param credits_remaining [Integer] Credits remaining for your organization.
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -20,7 +20,9 @@ module ContextDev
|
|
|
20
20
|
optional :cursor, String, nil?: true
|
|
21
21
|
|
|
22
22
|
# @!attribute filter_by
|
|
23
|
-
# Optional result filters.
|
|
23
|
+
# Optional result filters. Use at most one of sourceDomain, sourceCountry,
|
|
24
|
+
# articleLanguage, or articleType. A date range may accompany that category;
|
|
25
|
+
# date.from must not exceed date.to.
|
|
24
26
|
#
|
|
25
27
|
# @return [ContextDev::Models::NewsSearchParams::FilterBy, nil]
|
|
26
28
|
optional :filter_by, -> { ContextDev::NewsSearchParams::FilterBy }, api_name: :filterBy
|
|
@@ -44,11 +46,14 @@ module ContextDev
|
|
|
44
46
|
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
45
47
|
|
|
46
48
|
# @!method initialize(search_by:, cursor: nil, filter_by: nil, limit: nil, sort_by: nil, tags: nil, request_options: {})
|
|
49
|
+
# Some parameter documentations has been truncated, see
|
|
50
|
+
# {ContextDev::Models::NewsSearchParams} for more details.
|
|
51
|
+
#
|
|
47
52
|
# @param search_by [ContextDev::Models::NewsSearchParams::SearchBy] What to search for.
|
|
48
53
|
#
|
|
49
54
|
# @param cursor [String, nil] Opaque next_cursor from the previous response, or null for the first page.
|
|
50
55
|
#
|
|
51
|
-
# @param filter_by [ContextDev::Models::NewsSearchParams::FilterBy] Optional result filters.
|
|
56
|
+
# @param filter_by [ContextDev::Models::NewsSearchParams::FilterBy] Optional result filters. Use at most one of sourceDomain, sourceCountry, article
|
|
52
57
|
#
|
|
53
58
|
# @param limit [Integer] Maximum results to return. Defaults to 10.
|
|
54
59
|
#
|
|
@@ -314,7 +319,7 @@ module ContextDev
|
|
|
314
319
|
api_name: :articleType
|
|
315
320
|
|
|
316
321
|
# @!attribute date
|
|
317
|
-
# Published-at window in epoch milliseconds.
|
|
322
|
+
# Published-at window in epoch milliseconds. from must be before or equal to to.
|
|
318
323
|
#
|
|
319
324
|
# @return [ContextDev::Models::NewsSearchParams::FilterBy::Date, nil]
|
|
320
325
|
optional :date, -> { ContextDev::NewsSearchParams::FilterBy::Date }
|
|
@@ -336,13 +341,15 @@ module ContextDev
|
|
|
336
341
|
optional :source_domain, ContextDev::Internal::Type::ArrayOf[String], api_name: :sourceDomain
|
|
337
342
|
|
|
338
343
|
# @!method initialize(article_language: nil, article_type: nil, date: nil, source_country: nil, source_domain: nil)
|
|
339
|
-
# Optional result filters.
|
|
344
|
+
# Optional result filters. Use at most one of sourceDomain, sourceCountry,
|
|
345
|
+
# articleLanguage, or articleType. A date range may accompany that category;
|
|
346
|
+
# date.from must not exceed date.to.
|
|
340
347
|
#
|
|
341
348
|
# @param article_language [Array<Symbol, ContextDev::Models::NewsSearchParams::FilterBy::ArticleLanguage>] Article languages to include. Up to 3.
|
|
342
349
|
#
|
|
343
350
|
# @param article_type [Array<Symbol, ContextDev::Models::NewsSearchParams::FilterBy::ArticleType>] Article types to include. Up to 3.
|
|
344
351
|
#
|
|
345
|
-
# @param date [ContextDev::Models::NewsSearchParams::FilterBy::Date] Published-at window in epoch milliseconds.
|
|
352
|
+
# @param date [ContextDev::Models::NewsSearchParams::FilterBy::Date] Published-at window in epoch milliseconds. from must be before or equal to to.
|
|
346
353
|
#
|
|
347
354
|
# @param source_country [Array<Symbol, ContextDev::Models::NewsSearchParams::FilterBy::SourceCountry>] Publisher countries to include, as lowercase ISO 3166-1 alpha-2 codes. Up to 3.
|
|
348
355
|
#
|
|
@@ -396,7 +403,7 @@ module ContextDev
|
|
|
396
403
|
optional :to, Integer
|
|
397
404
|
|
|
398
405
|
# @!method initialize(from: nil, to: nil)
|
|
399
|
-
# Published-at window in epoch milliseconds.
|
|
406
|
+
# Published-at window in epoch milliseconds. from must be before or equal to to.
|
|
400
407
|
#
|
|
401
408
|
# @param from [Integer] Inclusive start of the published-at window, in epoch milliseconds.
|
|
402
409
|
#
|
|
@@ -89,20 +89,23 @@ module ContextDev
|
|
|
89
89
|
|
|
90
90
|
# @!attribute timeout_opts
|
|
91
91
|
# Total deadline, including navigation, actions, waiting, and all outputs.
|
|
92
|
-
# Defaults to 60000 milliseconds with behavior fail.
|
|
93
|
-
#
|
|
94
|
-
#
|
|
95
|
-
#
|
|
96
|
-
#
|
|
97
|
-
# when
|
|
92
|
+
# Defaults to 60000 milliseconds with behavior fail. Individual outputs have
|
|
93
|
+
# internal deadlines that reserve time to return completed outputs; timed-out
|
|
94
|
+
# outputs have success: false and data: null under either behavior. The overall
|
|
95
|
+
# request deadline remains enforced: fail returns an error if that deadline is
|
|
96
|
+
# reached. Use return-partial to allow the current page state and available
|
|
97
|
+
# outputs when the page is still loading. Partial responses set isPartial. Failed
|
|
98
|
+
# retrievals and incomplete captures are not cached; valid captured pieces may be
|
|
99
|
+
# cached independently. Fixed waits must fit before a response reserve of up to
|
|
100
|
+
# 5000 milliseconds (at most one quarter of the timeout) when using
|
|
101
|
+
# return-partial.
|
|
98
102
|
#
|
|
99
103
|
# @return [ContextDev::Models::WebScrapeParams::TimeoutOpts, nil]
|
|
100
104
|
optional :timeout_opts, -> { ContextDev::WebScrapeParams::TimeoutOpts }, api_name: :timeoutOpts
|
|
101
105
|
|
|
102
106
|
# @!attribute zdr
|
|
103
107
|
# Zero data retention. Bypasses caches and uploads; excludes request/response
|
|
104
|
-
# content and tags from logs. Must be enabled for your organization.
|
|
105
|
-
# with the highlights output.
|
|
108
|
+
# content and tags from logs. Must be enabled for your organization.
|
|
106
109
|
#
|
|
107
110
|
# @return [Symbol, ContextDev::Models::WebScrapeParams::Zdr, nil]
|
|
108
111
|
optional :zdr, enum: -> { ContextDev::WebScrapeParams::Zdr }
|
|
@@ -149,9 +152,9 @@ module ContextDev
|
|
|
149
152
|
optional :bytes, ContextDev::Internal::Type::Boolean
|
|
150
153
|
|
|
151
154
|
# @!attribute highlights
|
|
152
|
-
#
|
|
153
|
-
#
|
|
154
|
-
#
|
|
155
|
+
# Relevant Markdown excerpts for your question or topic, preserving code, lists,
|
|
156
|
+
# and tables, with headings included when needed for context. Adds 3 credits when
|
|
157
|
+
# passages are returned.
|
|
155
158
|
#
|
|
156
159
|
# @return [Boolean, nil]
|
|
157
160
|
optional :highlights, ContextDev::Internal::Type::Boolean
|
|
@@ -169,10 +172,8 @@ module ContextDev
|
|
|
169
172
|
optional :images, ContextDev::Internal::Type::Boolean
|
|
170
173
|
|
|
171
174
|
# @!attribute json
|
|
172
|
-
# Page data extracted
|
|
173
|
-
#
|
|
174
|
-
# Adds four credits when the page has text to extract; when shared content filters
|
|
175
|
-
# leave no text the result is an empty object and only the base price applies.
|
|
175
|
+
# Page data extracted using your schema. Adds 4 credits when extraction succeeds
|
|
176
|
+
# and its result is returned.
|
|
176
177
|
#
|
|
177
178
|
# @return [Boolean, nil]
|
|
178
179
|
optional :json, ContextDev::Internal::Type::Boolean
|
|
@@ -190,7 +191,8 @@ module ContextDev
|
|
|
190
191
|
optional :parse, ContextDev::Internal::Type::Boolean
|
|
191
192
|
|
|
192
193
|
# @!attribute product
|
|
193
|
-
#
|
|
194
|
+
# Product details such as name, price, and availability. Adds 1 credit when its
|
|
195
|
+
# successful result is returned or the target page is missing.
|
|
194
196
|
#
|
|
195
197
|
# @return [Boolean, nil]
|
|
196
198
|
optional :product, ContextDev::Internal::Type::Boolean
|
|
@@ -209,19 +211,19 @@ module ContextDev
|
|
|
209
211
|
#
|
|
210
212
|
# @param bytes [Boolean] The original HTTP response body.
|
|
211
213
|
#
|
|
212
|
-
# @param highlights [Boolean]
|
|
214
|
+
# @param highlights [Boolean] Relevant Markdown excerpts for your question or topic, preserving code, lists, a
|
|
213
215
|
#
|
|
214
216
|
# @param html [Boolean] Rendered HTML.
|
|
215
217
|
#
|
|
216
218
|
# @param images [Boolean] Images found on the page.
|
|
217
219
|
#
|
|
218
|
-
# @param json [Boolean] Page data extracted
|
|
220
|
+
# @param json [Boolean] Page data extracted using your schema. Adds 4 credits when extraction succeeds a
|
|
219
221
|
#
|
|
220
222
|
# @param markdown [Boolean] Page content as Markdown.
|
|
221
223
|
#
|
|
222
224
|
# @param parse [Boolean] Fields selected by parseParams.rules.
|
|
223
225
|
#
|
|
224
|
-
# @param product [Boolean]
|
|
226
|
+
# @param product [Boolean] Product details such as name, price, and availability. Adds 1 credit when its su
|
|
225
227
|
#
|
|
226
228
|
# @param screenshot [Boolean] An inline image of the page.
|
|
227
229
|
end
|
|
@@ -467,9 +469,10 @@ module ContextDev
|
|
|
467
469
|
class ProductParams < ContextDev::Internal::Type::BaseModel
|
|
468
470
|
# @!attribute use_ai_fallback
|
|
469
471
|
# Extract the product with a specialized model when the page has no structured
|
|
470
|
-
# product data. Adds six credits when the model
|
|
471
|
-
# fails,
|
|
472
|
-
# charge. Request deadlines and client
|
|
472
|
+
# product data. Adds six credits when the model verdict is returned successfully.
|
|
473
|
+
# If the fallback fails, the product output has success: false and data: null with
|
|
474
|
+
# no fallback charge; other outputs remain available. Request deadlines and client
|
|
475
|
+
# disconnects still apply.
|
|
473
476
|
#
|
|
474
477
|
# @return [Boolean, nil]
|
|
475
478
|
optional :use_ai_fallback, ContextDev::Internal::Type::Boolean, api_name: :useAIFallback
|
|
@@ -989,12 +992,16 @@ module ContextDev
|
|
|
989
992
|
# {ContextDev::Models::WebScrapeParams::TimeoutOpts} for more details.
|
|
990
993
|
#
|
|
991
994
|
# Total deadline, including navigation, actions, waiting, and all outputs.
|
|
992
|
-
# Defaults to 60000 milliseconds with behavior fail.
|
|
993
|
-
#
|
|
994
|
-
#
|
|
995
|
-
#
|
|
996
|
-
#
|
|
997
|
-
# when
|
|
995
|
+
# Defaults to 60000 milliseconds with behavior fail. Individual outputs have
|
|
996
|
+
# internal deadlines that reserve time to return completed outputs; timed-out
|
|
997
|
+
# outputs have success: false and data: null under either behavior. The overall
|
|
998
|
+
# request deadline remains enforced: fail returns an error if that deadline is
|
|
999
|
+
# reached. Use return-partial to allow the current page state and available
|
|
1000
|
+
# outputs when the page is still loading. Partial responses set isPartial. Failed
|
|
1001
|
+
# retrievals and incomplete captures are not cached; valid captured pieces may be
|
|
1002
|
+
# cached independently. Fixed waits must fit before a response reserve of up to
|
|
1003
|
+
# 5000 milliseconds (at most one quarter of the timeout) when using
|
|
1004
|
+
# return-partial.
|
|
998
1005
|
#
|
|
999
1006
|
# @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
1000
1007
|
#
|
|
@@ -1019,8 +1026,7 @@ module ContextDev
|
|
|
1019
1026
|
end
|
|
1020
1027
|
|
|
1021
1028
|
# Zero data retention. Bypasses caches and uploads; excludes request/response
|
|
1022
|
-
# content and tags from logs. Must be enabled for your organization.
|
|
1023
|
-
# with the highlights output.
|
|
1029
|
+
# content and tags from logs. Must be enabled for your organization.
|
|
1024
1030
|
module Zdr
|
|
1025
1031
|
extend ContextDev::Internal::Type::Enum
|
|
1026
1032
|
|