context.dev 1.34.0 → 1.36.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 +19 -0
- data/README.md +9 -9
- data/lib/context_dev/models/web_extract_styleguide_params.rb +22 -1
- data/lib/context_dev/models/web_screenshot_params.rb +258 -1
- data/lib/context_dev/models/web_search_params.rb +270 -3
- data/lib/context_dev/models/web_web_crawl_md_params.rb +226 -1
- data/lib/context_dev/models/web_web_scrape_html_params.rb +224 -1
- data/lib/context_dev/models/web_web_scrape_md_params.rb +224 -1
- data/lib/context_dev/resources/web.rb +28 -7
- data/lib/context_dev/version.rb +1 -1
- data/rbi/context_dev/models/web_extract_styleguide_params.rbi +59 -0
- data/rbi/context_dev/models/web_screenshot_params.rbi +316 -0
- data/rbi/context_dev/models/web_search_params.rbi +288 -2
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +245 -0
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +450 -0
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +244 -0
- data/rbi/context_dev/resources/web.rbi +43 -1
- data/sig/context_dev/models/web_extract_styleguide_params.rbs +20 -0
- data/sig/context_dev/models/web_screenshot_params.rbs +453 -0
- data/sig/context_dev/models/web_search_params.rbs +503 -0
- data/sig/context_dev/models/web_web_crawl_md_params.rbs +426 -0
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +426 -0
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +426 -0
- data/sig/context_dev/resources/web.rbs +9 -0
- metadata +2 -2
|
@@ -13,6 +13,13 @@ module ContextDev
|
|
|
13
13
|
# @return [String]
|
|
14
14
|
required :url, String
|
|
15
15
|
|
|
16
|
+
# @!attribute country
|
|
17
|
+
# Two-letter ISO 3166-1 alpha-2 country code for the website request location.
|
|
18
|
+
# When provided, Context.dev fetches the target page from that country.
|
|
19
|
+
#
|
|
20
|
+
# @return [Symbol, ContextDev::Models::WebWebScrapeHTMLParams::Country, nil]
|
|
21
|
+
optional :country, enum: -> { ContextDev::WebWebScrapeHTMLParams::Country }
|
|
22
|
+
|
|
16
23
|
# @!attribute exclude_selectors
|
|
17
24
|
# CSS selectors to remove from the result. Applied after includeSelectors.
|
|
18
25
|
# Exclusion takes precedence: an element matching both is removed. Examples:
|
|
@@ -80,12 +87,14 @@ module ContextDev
|
|
|
80
87
|
# @return [Integer, nil]
|
|
81
88
|
optional :wait_for_ms, Integer
|
|
82
89
|
|
|
83
|
-
# @!method initialize(url:, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
90
|
+
# @!method initialize(url:, country: nil, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
84
91
|
# Some parameter documentations has been truncated, see
|
|
85
92
|
# {ContextDev::Models::WebWebScrapeHTMLParams} for more details.
|
|
86
93
|
#
|
|
87
94
|
# @param url [String] Full URL to scrape (must include http:// or https:// protocol)
|
|
88
95
|
#
|
|
96
|
+
# @param country [Symbol, ContextDev::Models::WebWebScrapeHTMLParams::Country] Two-letter ISO 3166-1 alpha-2 country code for the website request location. Whe
|
|
97
|
+
#
|
|
89
98
|
# @param exclude_selectors [Array<String>] CSS selectors to remove from the result. Applied after includeSelectors. Exclusi
|
|
90
99
|
#
|
|
91
100
|
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
|
|
@@ -106,6 +115,220 @@ module ContextDev
|
|
|
106
115
|
#
|
|
107
116
|
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
108
117
|
|
|
118
|
+
# Two-letter ISO 3166-1 alpha-2 country code for the website request location.
|
|
119
|
+
# When provided, Context.dev fetches the target page from that country.
|
|
120
|
+
module Country
|
|
121
|
+
extend ContextDev::Internal::Type::Enum
|
|
122
|
+
|
|
123
|
+
AD = :ad
|
|
124
|
+
AE = :ae
|
|
125
|
+
AF = :af
|
|
126
|
+
AG = :ag
|
|
127
|
+
AI = :ai
|
|
128
|
+
AL = :al
|
|
129
|
+
AM = :am
|
|
130
|
+
AO = :ao
|
|
131
|
+
AR = :ar
|
|
132
|
+
AT = :at
|
|
133
|
+
AU = :au
|
|
134
|
+
AW = :aw
|
|
135
|
+
AZ = :az
|
|
136
|
+
BA = :ba
|
|
137
|
+
BB = :bb
|
|
138
|
+
BD = :bd
|
|
139
|
+
BE = :be
|
|
140
|
+
BF = :bf
|
|
141
|
+
BG = :bg
|
|
142
|
+
BH = :bh
|
|
143
|
+
BI = :bi
|
|
144
|
+
BJ = :bj
|
|
145
|
+
BM = :bm
|
|
146
|
+
BN = :bn
|
|
147
|
+
BO = :bo
|
|
148
|
+
BQ = :bq
|
|
149
|
+
BR = :br
|
|
150
|
+
BS = :bs
|
|
151
|
+
BW = :bw
|
|
152
|
+
BY = :by
|
|
153
|
+
BZ = :bz
|
|
154
|
+
CA = :ca
|
|
155
|
+
CD = :cd
|
|
156
|
+
CF = :cf
|
|
157
|
+
CG = :cg
|
|
158
|
+
CH = :ch
|
|
159
|
+
CI = :ci
|
|
160
|
+
CL = :cl
|
|
161
|
+
CM = :cm
|
|
162
|
+
CN = :cn
|
|
163
|
+
CO = :co
|
|
164
|
+
CR = :cr
|
|
165
|
+
CV = :cv
|
|
166
|
+
CW = :cw
|
|
167
|
+
CY = :cy
|
|
168
|
+
CZ = :cz
|
|
169
|
+
DE = :de
|
|
170
|
+
DJ = :dj
|
|
171
|
+
DK = :dk
|
|
172
|
+
DM = :dm
|
|
173
|
+
DO = :do
|
|
174
|
+
DZ = :dz
|
|
175
|
+
EC = :ec
|
|
176
|
+
EE = :ee
|
|
177
|
+
EG = :eg
|
|
178
|
+
ES = :es
|
|
179
|
+
ET = :et
|
|
180
|
+
FI = :fi
|
|
181
|
+
FJ = :fj
|
|
182
|
+
FR = :fr
|
|
183
|
+
GA = :ga
|
|
184
|
+
GB = :gb
|
|
185
|
+
GD = :gd
|
|
186
|
+
GE = :ge
|
|
187
|
+
GF = :gf
|
|
188
|
+
GG = :gg
|
|
189
|
+
GH = :gh
|
|
190
|
+
GM = :gm
|
|
191
|
+
GN = :gn
|
|
192
|
+
GP = :gp
|
|
193
|
+
GQ = :gq
|
|
194
|
+
GR = :gr
|
|
195
|
+
GT = :gt
|
|
196
|
+
GU = :gu
|
|
197
|
+
GW = :gw
|
|
198
|
+
GY = :gy
|
|
199
|
+
HK = :hk
|
|
200
|
+
HN = :hn
|
|
201
|
+
HR = :hr
|
|
202
|
+
HT = :ht
|
|
203
|
+
HU = :hu
|
|
204
|
+
ID = :id
|
|
205
|
+
IE = :ie
|
|
206
|
+
IL = :il
|
|
207
|
+
IM = :im
|
|
208
|
+
IN = :in
|
|
209
|
+
IQ = :iq
|
|
210
|
+
IR = :ir
|
|
211
|
+
IS = :is
|
|
212
|
+
IT = :it
|
|
213
|
+
JE = :je
|
|
214
|
+
JM = :jm
|
|
215
|
+
JO = :jo
|
|
216
|
+
JP = :jp
|
|
217
|
+
KE = :ke
|
|
218
|
+
KG = :kg
|
|
219
|
+
KH = :kh
|
|
220
|
+
KN = :kn
|
|
221
|
+
KR = :kr
|
|
222
|
+
KW = :kw
|
|
223
|
+
KY = :ky
|
|
224
|
+
KZ = :kz
|
|
225
|
+
LA = :la
|
|
226
|
+
LB = :lb
|
|
227
|
+
LC = :lc
|
|
228
|
+
LK = :lk
|
|
229
|
+
LR = :lr
|
|
230
|
+
LS = :ls
|
|
231
|
+
LT = :lt
|
|
232
|
+
LU = :lu
|
|
233
|
+
LV = :lv
|
|
234
|
+
LY = :ly
|
|
235
|
+
MA = :ma
|
|
236
|
+
MC = :mc
|
|
237
|
+
MD = :md
|
|
238
|
+
ME = :me
|
|
239
|
+
MF = :mf
|
|
240
|
+
MG = :mg
|
|
241
|
+
MK = :mk
|
|
242
|
+
ML = :ml
|
|
243
|
+
MM = :mm
|
|
244
|
+
MN = :mn
|
|
245
|
+
MO = :mo
|
|
246
|
+
MQ = :mq
|
|
247
|
+
MR = :mr
|
|
248
|
+
MT = :mt
|
|
249
|
+
MU = :mu
|
|
250
|
+
MV = :mv
|
|
251
|
+
MW = :mw
|
|
252
|
+
MX = :mx
|
|
253
|
+
MY = :my
|
|
254
|
+
MZ = :mz
|
|
255
|
+
NA = :na
|
|
256
|
+
NC = :nc
|
|
257
|
+
NE = :ne
|
|
258
|
+
NG = :ng
|
|
259
|
+
NI = :ni
|
|
260
|
+
NL = :nl
|
|
261
|
+
NO = :no
|
|
262
|
+
NP = :np
|
|
263
|
+
NZ = :nz
|
|
264
|
+
OM = :om
|
|
265
|
+
PA = :pa
|
|
266
|
+
PE = :pe
|
|
267
|
+
PF = :pf
|
|
268
|
+
PG = :pg
|
|
269
|
+
PH = :ph
|
|
270
|
+
PK = :pk
|
|
271
|
+
PL = :pl
|
|
272
|
+
PR = :pr
|
|
273
|
+
PS = :ps
|
|
274
|
+
PT = :pt
|
|
275
|
+
PY = :py
|
|
276
|
+
QA = :qa
|
|
277
|
+
RE = :re
|
|
278
|
+
RO = :ro
|
|
279
|
+
RS = :rs
|
|
280
|
+
RU = :ru
|
|
281
|
+
RW = :rw
|
|
282
|
+
SA = :sa
|
|
283
|
+
SC = :sc
|
|
284
|
+
SD = :sd
|
|
285
|
+
SE = :se
|
|
286
|
+
SG = :sg
|
|
287
|
+
SI = :si
|
|
288
|
+
SK = :sk
|
|
289
|
+
SL = :sl
|
|
290
|
+
SM = :sm
|
|
291
|
+
SN = :sn
|
|
292
|
+
SO = :so
|
|
293
|
+
SR = :sr
|
|
294
|
+
SS = :ss
|
|
295
|
+
ST = :st
|
|
296
|
+
SV = :sv
|
|
297
|
+
SX = :sx
|
|
298
|
+
SY = :sy
|
|
299
|
+
SZ = :sz
|
|
300
|
+
TC = :tc
|
|
301
|
+
TD = :td
|
|
302
|
+
TG = :tg
|
|
303
|
+
TH = :th
|
|
304
|
+
TJ = :tj
|
|
305
|
+
TL = :tl
|
|
306
|
+
TM = :tm
|
|
307
|
+
TN = :tn
|
|
308
|
+
TR = :tr
|
|
309
|
+
TT = :tt
|
|
310
|
+
TW = :tw
|
|
311
|
+
TZ = :tz
|
|
312
|
+
UA = :ua
|
|
313
|
+
UG = :ug
|
|
314
|
+
US = :us
|
|
315
|
+
UY = :uy
|
|
316
|
+
UZ = :uz
|
|
317
|
+
VC = :vc
|
|
318
|
+
VE = :ve
|
|
319
|
+
VG = :vg
|
|
320
|
+
VI = :vi
|
|
321
|
+
VN = :vn
|
|
322
|
+
YE = :ye
|
|
323
|
+
YT = :yt
|
|
324
|
+
ZA = :za
|
|
325
|
+
ZM = :zm
|
|
326
|
+
ZW = :zw
|
|
327
|
+
|
|
328
|
+
# @!method self.values
|
|
329
|
+
# @return [Array<Symbol>]
|
|
330
|
+
end
|
|
331
|
+
|
|
109
332
|
class Pdf < ContextDev::Internal::Type::BaseModel
|
|
110
333
|
# @!attribute end_
|
|
111
334
|
# Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
|
|
@@ -14,6 +14,13 @@ module ContextDev
|
|
|
14
14
|
# @return [String]
|
|
15
15
|
required :url, String
|
|
16
16
|
|
|
17
|
+
# @!attribute country
|
|
18
|
+
# Two-letter ISO 3166-1 alpha-2 country code for the website request location.
|
|
19
|
+
# When provided, Context.dev fetches the target page from that country.
|
|
20
|
+
#
|
|
21
|
+
# @return [Symbol, ContextDev::Models::WebWebScrapeMdParams::Country, nil]
|
|
22
|
+
optional :country, enum: -> { ContextDev::WebWebScrapeMdParams::Country }
|
|
23
|
+
|
|
17
24
|
# @!attribute exclude_selectors
|
|
18
25
|
# CSS selectors to remove before conversion to Markdown. Applied after
|
|
19
26
|
# includeSelectors. Exclusion takes precedence: an element matching both is
|
|
@@ -99,12 +106,14 @@ module ContextDev
|
|
|
99
106
|
# @return [Integer, nil]
|
|
100
107
|
optional :wait_for_ms, Integer
|
|
101
108
|
|
|
102
|
-
# @!method initialize(url:, exclude_selectors: nil, headers: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
109
|
+
# @!method initialize(url:, country: nil, exclude_selectors: nil, headers: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
103
110
|
# Some parameter documentations has been truncated, see
|
|
104
111
|
# {ContextDev::Models::WebWebScrapeMdParams} for more details.
|
|
105
112
|
#
|
|
106
113
|
# @param url [String] Full URL to scrape into LLM usable Markdown (must include http:// or https:// pr
|
|
107
114
|
#
|
|
115
|
+
# @param country [Symbol, ContextDev::Models::WebWebScrapeMdParams::Country] Two-letter ISO 3166-1 alpha-2 country code for the website request location. Whe
|
|
116
|
+
#
|
|
108
117
|
# @param exclude_selectors [Array<String>] CSS selectors to remove before conversion to Markdown. Applied after includeSele
|
|
109
118
|
#
|
|
110
119
|
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
|
|
@@ -131,6 +140,220 @@ module ContextDev
|
|
|
131
140
|
#
|
|
132
141
|
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
133
142
|
|
|
143
|
+
# Two-letter ISO 3166-1 alpha-2 country code for the website request location.
|
|
144
|
+
# When provided, Context.dev fetches the target page from that country.
|
|
145
|
+
module Country
|
|
146
|
+
extend ContextDev::Internal::Type::Enum
|
|
147
|
+
|
|
148
|
+
AD = :ad
|
|
149
|
+
AE = :ae
|
|
150
|
+
AF = :af
|
|
151
|
+
AG = :ag
|
|
152
|
+
AI = :ai
|
|
153
|
+
AL = :al
|
|
154
|
+
AM = :am
|
|
155
|
+
AO = :ao
|
|
156
|
+
AR = :ar
|
|
157
|
+
AT = :at
|
|
158
|
+
AU = :au
|
|
159
|
+
AW = :aw
|
|
160
|
+
AZ = :az
|
|
161
|
+
BA = :ba
|
|
162
|
+
BB = :bb
|
|
163
|
+
BD = :bd
|
|
164
|
+
BE = :be
|
|
165
|
+
BF = :bf
|
|
166
|
+
BG = :bg
|
|
167
|
+
BH = :bh
|
|
168
|
+
BI = :bi
|
|
169
|
+
BJ = :bj
|
|
170
|
+
BM = :bm
|
|
171
|
+
BN = :bn
|
|
172
|
+
BO = :bo
|
|
173
|
+
BQ = :bq
|
|
174
|
+
BR = :br
|
|
175
|
+
BS = :bs
|
|
176
|
+
BW = :bw
|
|
177
|
+
BY = :by
|
|
178
|
+
BZ = :bz
|
|
179
|
+
CA = :ca
|
|
180
|
+
CD = :cd
|
|
181
|
+
CF = :cf
|
|
182
|
+
CG = :cg
|
|
183
|
+
CH = :ch
|
|
184
|
+
CI = :ci
|
|
185
|
+
CL = :cl
|
|
186
|
+
CM = :cm
|
|
187
|
+
CN = :cn
|
|
188
|
+
CO = :co
|
|
189
|
+
CR = :cr
|
|
190
|
+
CV = :cv
|
|
191
|
+
CW = :cw
|
|
192
|
+
CY = :cy
|
|
193
|
+
CZ = :cz
|
|
194
|
+
DE = :de
|
|
195
|
+
DJ = :dj
|
|
196
|
+
DK = :dk
|
|
197
|
+
DM = :dm
|
|
198
|
+
DO = :do
|
|
199
|
+
DZ = :dz
|
|
200
|
+
EC = :ec
|
|
201
|
+
EE = :ee
|
|
202
|
+
EG = :eg
|
|
203
|
+
ES = :es
|
|
204
|
+
ET = :et
|
|
205
|
+
FI = :fi
|
|
206
|
+
FJ = :fj
|
|
207
|
+
FR = :fr
|
|
208
|
+
GA = :ga
|
|
209
|
+
GB = :gb
|
|
210
|
+
GD = :gd
|
|
211
|
+
GE = :ge
|
|
212
|
+
GF = :gf
|
|
213
|
+
GG = :gg
|
|
214
|
+
GH = :gh
|
|
215
|
+
GM = :gm
|
|
216
|
+
GN = :gn
|
|
217
|
+
GP = :gp
|
|
218
|
+
GQ = :gq
|
|
219
|
+
GR = :gr
|
|
220
|
+
GT = :gt
|
|
221
|
+
GU = :gu
|
|
222
|
+
GW = :gw
|
|
223
|
+
GY = :gy
|
|
224
|
+
HK = :hk
|
|
225
|
+
HN = :hn
|
|
226
|
+
HR = :hr
|
|
227
|
+
HT = :ht
|
|
228
|
+
HU = :hu
|
|
229
|
+
ID = :id
|
|
230
|
+
IE = :ie
|
|
231
|
+
IL = :il
|
|
232
|
+
IM = :im
|
|
233
|
+
IN = :in
|
|
234
|
+
IQ = :iq
|
|
235
|
+
IR = :ir
|
|
236
|
+
IS = :is
|
|
237
|
+
IT = :it
|
|
238
|
+
JE = :je
|
|
239
|
+
JM = :jm
|
|
240
|
+
JO = :jo
|
|
241
|
+
JP = :jp
|
|
242
|
+
KE = :ke
|
|
243
|
+
KG = :kg
|
|
244
|
+
KH = :kh
|
|
245
|
+
KN = :kn
|
|
246
|
+
KR = :kr
|
|
247
|
+
KW = :kw
|
|
248
|
+
KY = :ky
|
|
249
|
+
KZ = :kz
|
|
250
|
+
LA = :la
|
|
251
|
+
LB = :lb
|
|
252
|
+
LC = :lc
|
|
253
|
+
LK = :lk
|
|
254
|
+
LR = :lr
|
|
255
|
+
LS = :ls
|
|
256
|
+
LT = :lt
|
|
257
|
+
LU = :lu
|
|
258
|
+
LV = :lv
|
|
259
|
+
LY = :ly
|
|
260
|
+
MA = :ma
|
|
261
|
+
MC = :mc
|
|
262
|
+
MD = :md
|
|
263
|
+
ME = :me
|
|
264
|
+
MF = :mf
|
|
265
|
+
MG = :mg
|
|
266
|
+
MK = :mk
|
|
267
|
+
ML = :ml
|
|
268
|
+
MM = :mm
|
|
269
|
+
MN = :mn
|
|
270
|
+
MO = :mo
|
|
271
|
+
MQ = :mq
|
|
272
|
+
MR = :mr
|
|
273
|
+
MT = :mt
|
|
274
|
+
MU = :mu
|
|
275
|
+
MV = :mv
|
|
276
|
+
MW = :mw
|
|
277
|
+
MX = :mx
|
|
278
|
+
MY = :my
|
|
279
|
+
MZ = :mz
|
|
280
|
+
NA = :na
|
|
281
|
+
NC = :nc
|
|
282
|
+
NE = :ne
|
|
283
|
+
NG = :ng
|
|
284
|
+
NI = :ni
|
|
285
|
+
NL = :nl
|
|
286
|
+
NO = :no
|
|
287
|
+
NP = :np
|
|
288
|
+
NZ = :nz
|
|
289
|
+
OM = :om
|
|
290
|
+
PA = :pa
|
|
291
|
+
PE = :pe
|
|
292
|
+
PF = :pf
|
|
293
|
+
PG = :pg
|
|
294
|
+
PH = :ph
|
|
295
|
+
PK = :pk
|
|
296
|
+
PL = :pl
|
|
297
|
+
PR = :pr
|
|
298
|
+
PS = :ps
|
|
299
|
+
PT = :pt
|
|
300
|
+
PY = :py
|
|
301
|
+
QA = :qa
|
|
302
|
+
RE = :re
|
|
303
|
+
RO = :ro
|
|
304
|
+
RS = :rs
|
|
305
|
+
RU = :ru
|
|
306
|
+
RW = :rw
|
|
307
|
+
SA = :sa
|
|
308
|
+
SC = :sc
|
|
309
|
+
SD = :sd
|
|
310
|
+
SE = :se
|
|
311
|
+
SG = :sg
|
|
312
|
+
SI = :si
|
|
313
|
+
SK = :sk
|
|
314
|
+
SL = :sl
|
|
315
|
+
SM = :sm
|
|
316
|
+
SN = :sn
|
|
317
|
+
SO = :so
|
|
318
|
+
SR = :sr
|
|
319
|
+
SS = :ss
|
|
320
|
+
ST = :st
|
|
321
|
+
SV = :sv
|
|
322
|
+
SX = :sx
|
|
323
|
+
SY = :sy
|
|
324
|
+
SZ = :sz
|
|
325
|
+
TC = :tc
|
|
326
|
+
TD = :td
|
|
327
|
+
TG = :tg
|
|
328
|
+
TH = :th
|
|
329
|
+
TJ = :tj
|
|
330
|
+
TL = :tl
|
|
331
|
+
TM = :tm
|
|
332
|
+
TN = :tn
|
|
333
|
+
TR = :tr
|
|
334
|
+
TT = :tt
|
|
335
|
+
TW = :tw
|
|
336
|
+
TZ = :tz
|
|
337
|
+
UA = :ua
|
|
338
|
+
UG = :ug
|
|
339
|
+
US = :us
|
|
340
|
+
UY = :uy
|
|
341
|
+
UZ = :uz
|
|
342
|
+
VC = :vc
|
|
343
|
+
VE = :ve
|
|
344
|
+
VG = :vg
|
|
345
|
+
VI = :vi
|
|
346
|
+
VN = :vn
|
|
347
|
+
YE = :ye
|
|
348
|
+
YT = :yt
|
|
349
|
+
ZA = :za
|
|
350
|
+
ZM = :zm
|
|
351
|
+
ZW = :zw
|
|
352
|
+
|
|
353
|
+
# @!method self.values
|
|
354
|
+
# @return [Array<Symbol>]
|
|
355
|
+
end
|
|
356
|
+
|
|
134
357
|
class Pdf < ContextDev::Internal::Type::BaseModel
|
|
135
358
|
# @!attribute end_
|
|
136
359
|
# Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
|
|
@@ -127,7 +127,9 @@ module ContextDev
|
|
|
127
127
|
# Extract a comprehensive design system from a website including colors,
|
|
128
128
|
# typography, spacing, shadows, and UI components.
|
|
129
129
|
#
|
|
130
|
-
# @overload extract_styleguide(direct_url: nil, domain: nil, max_age_ms: nil, timeout_ms: nil, request_options: {})
|
|
130
|
+
# @overload extract_styleguide(color_scheme: nil, direct_url: nil, domain: nil, max_age_ms: nil, timeout_ms: nil, request_options: {})
|
|
131
|
+
#
|
|
132
|
+
# @param color_scheme [Symbol, ContextDev::Models::WebExtractStyleguideParams::ColorScheme] Optional browser color scheme to emulate for websites that respond to prefers-co
|
|
131
133
|
#
|
|
132
134
|
# @param direct_url [String] A specific URL to fetch the styleguide from directly, bypassing domain resolutio
|
|
133
135
|
#
|
|
@@ -149,6 +151,7 @@ module ContextDev
|
|
|
149
151
|
method: :get,
|
|
150
152
|
path: "web/styleguide",
|
|
151
153
|
query: query.transform_keys(
|
|
154
|
+
color_scheme: "colorScheme",
|
|
152
155
|
direct_url: "directUrl",
|
|
153
156
|
max_age_ms: "maxAgeMs",
|
|
154
157
|
timeout_ms: "timeoutMS"
|
|
@@ -163,7 +166,11 @@ module ContextDev
|
|
|
163
166
|
#
|
|
164
167
|
# Capture a screenshot of a website.
|
|
165
168
|
#
|
|
166
|
-
# @overload screenshot(direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, request_options: {})
|
|
169
|
+
# @overload screenshot(color_scheme: nil, country: nil, direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, scroll_offset: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, request_options: {})
|
|
170
|
+
#
|
|
171
|
+
# @param color_scheme [Symbol, ContextDev::Models::WebScreenshotParams::ColorScheme] Optional parameter to choose the site's visual theme in the screenshot. Use 'lig
|
|
172
|
+
#
|
|
173
|
+
# @param country [Symbol, ContextDev::Models::WebScreenshotParams::Country] Two-letter ISO 3166-1 alpha-2 country code for the website request location. Whe
|
|
167
174
|
#
|
|
168
175
|
# @param direct_url [String] A specific URL to screenshot directly, bypassing domain resolution (e.g., 'https
|
|
169
176
|
#
|
|
@@ -177,6 +184,8 @@ module ContextDev
|
|
|
177
184
|
#
|
|
178
185
|
# @param page [Symbol, ContextDev::Models::WebScreenshotParams::Page] Optional parameter to specify which page type to screenshot. If provided, the sy
|
|
179
186
|
#
|
|
187
|
+
# @param scroll_offset [Integer] Optional vertical scroll offset in pixels for capturing a long page in viewport-
|
|
188
|
+
#
|
|
180
189
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
181
190
|
#
|
|
182
191
|
# @param viewport [ContextDev::Models::WebScreenshotParams::Viewport] Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
|
|
@@ -195,10 +204,12 @@ module ContextDev
|
|
|
195
204
|
method: :get,
|
|
196
205
|
path: "web/screenshot",
|
|
197
206
|
query: query.transform_keys(
|
|
207
|
+
color_scheme: "colorScheme",
|
|
198
208
|
direct_url: "directUrl",
|
|
199
209
|
full_screenshot: "fullScreenshot",
|
|
200
210
|
handle_cookie_popup: "handleCookiePopup",
|
|
201
211
|
max_age_ms: "maxAgeMs",
|
|
212
|
+
scroll_offset: "scrollOffset",
|
|
202
213
|
timeout_ms: "timeoutMS",
|
|
203
214
|
wait_for_ms: "waitForMs"
|
|
204
215
|
),
|
|
@@ -212,9 +223,11 @@ module ContextDev
|
|
|
212
223
|
#
|
|
213
224
|
# Search the web and optionally scrape each result to Markdown in one round-trip.
|
|
214
225
|
#
|
|
215
|
-
# @overload search(query:, exclude_domains: nil, freshness: nil, include_domains: nil, markdown_options: nil, query_fanout: nil, timeout_ms: nil, request_options: {})
|
|
226
|
+
# @overload search(query:, country: nil, exclude_domains: nil, freshness: nil, include_domains: nil, markdown_options: nil, num_results: nil, query_fanout: nil, timeout_ms: nil, request_options: {})
|
|
227
|
+
#
|
|
228
|
+
# @param query [String] Search query. Accepts natural language as well as Google-style search operators
|
|
216
229
|
#
|
|
217
|
-
# @param
|
|
230
|
+
# @param country [Symbol, ContextDev::Models::WebSearchParams::Country] Two-letter ISO 3166-1 alpha-2 country code to localize results to a specific cou
|
|
218
231
|
#
|
|
219
232
|
# @param exclude_domains [Array<String>] Blocklist — drop results from these domains. Example: ["pinterest.com", "reddit.
|
|
220
233
|
#
|
|
@@ -224,6 +237,8 @@ module ContextDev
|
|
|
224
237
|
#
|
|
225
238
|
# @param markdown_options [ContextDev::Models::WebSearchParams::MarkdownOptions] Inline Markdown scraping for each result. Set `enabled: true` to activate.
|
|
226
239
|
#
|
|
240
|
+
# @param num_results [Integer] Number of results to request and return (10–100). Defaults to 10.
|
|
241
|
+
#
|
|
227
242
|
# @param query_fanout [Boolean] Expand the query into multiple parallel variants for broader recall.
|
|
228
243
|
#
|
|
229
244
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
@@ -250,10 +265,12 @@ module ContextDev
|
|
|
250
265
|
# Performs a crawl starting from a given URL, extracts page content as Markdown,
|
|
251
266
|
# and returns results for all crawled pages.
|
|
252
267
|
#
|
|
253
|
-
# @overload web_crawl_md(url:, exclude_selectors: nil, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, shorten_base64_images: nil, stop_after_ms: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
268
|
+
# @overload web_crawl_md(url:, country: nil, exclude_selectors: nil, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, shorten_base64_images: nil, stop_after_ms: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
254
269
|
#
|
|
255
270
|
# @param url [String] The starting URL for the crawl (must include http:// or https:// protocol)
|
|
256
271
|
#
|
|
272
|
+
# @param country [Symbol, ContextDev::Models::WebWebCrawlMdParams::Country] Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev r
|
|
273
|
+
#
|
|
257
274
|
# @param exclude_selectors [Array<String>] CSS selectors to remove before each crawled page is converted to Markdown. Appli
|
|
258
275
|
#
|
|
259
276
|
# @param follow_subdomains [Boolean] When true, follow links on subdomains of the starting URL's domain (e.g. docs.ex
|
|
@@ -307,10 +324,12 @@ module ContextDev
|
|
|
307
324
|
#
|
|
308
325
|
# Scrapes the given URL and returns the raw HTML content of the page.
|
|
309
326
|
#
|
|
310
|
-
# @overload web_scrape_html(url:, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
327
|
+
# @overload web_scrape_html(url:, country: nil, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
311
328
|
#
|
|
312
329
|
# @param url [String] Full URL to scrape (must include http:// or https:// protocol)
|
|
313
330
|
#
|
|
331
|
+
# @param country [Symbol, ContextDev::Models::WebWebScrapeHTMLParams::Country] Two-letter ISO 3166-1 alpha-2 country code for the website request location. Whe
|
|
332
|
+
#
|
|
314
333
|
# @param exclude_selectors [Array<String>] CSS selectors to remove from the result. Applied after includeSelectors. Exclusi
|
|
315
334
|
#
|
|
316
335
|
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
|
|
@@ -402,10 +421,12 @@ module ContextDev
|
|
|
402
421
|
#
|
|
403
422
|
# Scrapes the given URL into LLM usable Markdown.
|
|
404
423
|
#
|
|
405
|
-
# @overload web_scrape_md(url:, exclude_selectors: nil, headers: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
424
|
+
# @overload web_scrape_md(url:, country: nil, exclude_selectors: nil, headers: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
406
425
|
#
|
|
407
426
|
# @param url [String] Full URL to scrape into LLM usable Markdown (must include http:// or https:// pr
|
|
408
427
|
#
|
|
428
|
+
# @param country [Symbol, ContextDev::Models::WebWebScrapeMdParams::Country] Two-letter ISO 3166-1 alpha-2 country code for the website request location. Whe
|
|
429
|
+
#
|
|
409
430
|
# @param exclude_selectors [Array<String>] CSS selectors to remove before conversion to Markdown. Applied after includeSele
|
|
410
431
|
#
|
|
411
432
|
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
|
data/lib/context_dev/version.rb
CHANGED