n8n-nodes-exa-official 0.3.2 → 0.3.3
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.
- package/dist/nodes/Exa/Exa.node.js +384 -579
- package/dist/nodes/Exa/Exa.node.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -45,23 +45,13 @@ class Exa {
|
|
|
45
45
|
{
|
|
46
46
|
name: 'Answer',
|
|
47
47
|
value: 'answer',
|
|
48
|
-
description: 'Get
|
|
48
|
+
description: 'Get a web-grounded LLM answer to a query',
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
name: 'Content',
|
|
52
52
|
value: 'contents',
|
|
53
53
|
description: 'Get contents from URLs',
|
|
54
54
|
},
|
|
55
|
-
{
|
|
56
|
-
name: 'Find Similar',
|
|
57
|
-
value: 'findSimilar',
|
|
58
|
-
description: 'Find similar links to a given URL',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: 'Research',
|
|
62
|
-
value: 'research',
|
|
63
|
-
description: 'Create and manage asynchronous research tasks',
|
|
64
|
-
},
|
|
65
55
|
{
|
|
66
56
|
name: 'Search',
|
|
67
57
|
value: 'search',
|
|
@@ -122,7 +112,7 @@ class Exa {
|
|
|
122
112
|
{
|
|
123
113
|
name: 'Get Contents',
|
|
124
114
|
value: 'getContents',
|
|
125
|
-
action: 'Get contents from
|
|
115
|
+
action: 'Get contents from urls',
|
|
126
116
|
description: 'Retrieve contents from a list of URLs',
|
|
127
117
|
routing: {
|
|
128
118
|
request: {
|
|
@@ -134,32 +124,6 @@ class Exa {
|
|
|
134
124
|
],
|
|
135
125
|
default: 'getContents',
|
|
136
126
|
},
|
|
137
|
-
{
|
|
138
|
-
displayName: 'Operation',
|
|
139
|
-
name: 'operation',
|
|
140
|
-
type: 'options',
|
|
141
|
-
noDataExpression: true,
|
|
142
|
-
displayOptions: {
|
|
143
|
-
show: {
|
|
144
|
-
resource: ['findSimilar'],
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
options: [
|
|
148
|
-
{
|
|
149
|
-
name: 'Find Similar Links',
|
|
150
|
-
value: 'findSimilar',
|
|
151
|
-
action: 'Find similar links',
|
|
152
|
-
description: 'Find links similar to a given URL',
|
|
153
|
-
routing: {
|
|
154
|
-
request: {
|
|
155
|
-
method: 'POST',
|
|
156
|
-
url: '/findSimilar',
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
],
|
|
161
|
-
default: 'findSimilar',
|
|
162
|
-
},
|
|
163
127
|
{
|
|
164
128
|
displayName: 'Operation',
|
|
165
129
|
name: 'operation',
|
|
@@ -174,8 +138,8 @@ class Exa {
|
|
|
174
138
|
{
|
|
175
139
|
name: 'Get Answer',
|
|
176
140
|
value: 'getAnswer',
|
|
177
|
-
action: 'Get
|
|
178
|
-
description: 'Get
|
|
141
|
+
action: 'Get a web grounded LLM answer',
|
|
142
|
+
description: 'Get a web-grounded LLM answer to a query',
|
|
179
143
|
routing: {
|
|
180
144
|
request: {
|
|
181
145
|
method: 'POST',
|
|
@@ -186,56 +150,6 @@ class Exa {
|
|
|
186
150
|
],
|
|
187
151
|
default: 'getAnswer',
|
|
188
152
|
},
|
|
189
|
-
{
|
|
190
|
-
displayName: 'Operation',
|
|
191
|
-
name: 'operation',
|
|
192
|
-
type: 'options',
|
|
193
|
-
noDataExpression: true,
|
|
194
|
-
displayOptions: {
|
|
195
|
-
show: {
|
|
196
|
-
resource: ['research'],
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
options: [
|
|
200
|
-
{
|
|
201
|
-
name: 'Create Task',
|
|
202
|
-
value: 'createTask',
|
|
203
|
-
action: 'Create a research task',
|
|
204
|
-
description: 'Create an asynchronous research task',
|
|
205
|
-
routing: {
|
|
206
|
-
request: {
|
|
207
|
-
method: 'POST',
|
|
208
|
-
url: '/research/v1',
|
|
209
|
-
},
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
name: 'Get Task',
|
|
214
|
-
value: 'getTask',
|
|
215
|
-
action: 'Get a research task',
|
|
216
|
-
description: 'Retrieve status and results of a research task',
|
|
217
|
-
routing: {
|
|
218
|
-
request: {
|
|
219
|
-
method: 'GET',
|
|
220
|
-
url: '=/research/v1/{{ $parameter.researchId }}',
|
|
221
|
-
},
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
name: 'List Tasks',
|
|
226
|
-
value: 'listTasks',
|
|
227
|
-
action: 'List research tasks',
|
|
228
|
-
description: 'Retrieve a paginated list of research tasks',
|
|
229
|
-
routing: {
|
|
230
|
-
request: {
|
|
231
|
-
method: 'GET',
|
|
232
|
-
url: '/research/v1',
|
|
233
|
-
},
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
],
|
|
237
|
-
default: 'createTask',
|
|
238
|
-
},
|
|
239
153
|
{
|
|
240
154
|
displayName: 'Query',
|
|
241
155
|
name: 'query',
|
|
@@ -256,96 +170,6 @@ class Exa {
|
|
|
256
170
|
},
|
|
257
171
|
},
|
|
258
172
|
},
|
|
259
|
-
{
|
|
260
|
-
displayName: 'Deep Search Type',
|
|
261
|
-
name: 'deepSearchType',
|
|
262
|
-
type: 'options',
|
|
263
|
-
displayOptions: {
|
|
264
|
-
show: {
|
|
265
|
-
resource: ['search'],
|
|
266
|
-
operation: ['deepSearch'],
|
|
267
|
-
},
|
|
268
|
-
},
|
|
269
|
-
options: [
|
|
270
|
-
{
|
|
271
|
-
name: 'Deep',
|
|
272
|
-
value: 'deep',
|
|
273
|
-
description: 'Deep search with synthesized output (~5s)',
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
name: 'Deep Reasoning',
|
|
277
|
-
value: 'deep-reasoning',
|
|
278
|
-
description: 'Full deep search with stronger reasoning (~7s)',
|
|
279
|
-
},
|
|
280
|
-
],
|
|
281
|
-
default: 'deep',
|
|
282
|
-
description: 'The deep search variant to use',
|
|
283
|
-
routing: {
|
|
284
|
-
request: {
|
|
285
|
-
body: {
|
|
286
|
-
type: '={{ $value }}',
|
|
287
|
-
},
|
|
288
|
-
},
|
|
289
|
-
},
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
displayName: 'Instructions',
|
|
293
|
-
name: 'instructions',
|
|
294
|
-
type: 'string',
|
|
295
|
-
required: true,
|
|
296
|
-
displayOptions: {
|
|
297
|
-
show: {
|
|
298
|
-
resource: ['research'],
|
|
299
|
-
operation: ['createTask'],
|
|
300
|
-
},
|
|
301
|
-
},
|
|
302
|
-
default: '',
|
|
303
|
-
description: 'Instructions for what you would like research on',
|
|
304
|
-
typeOptions: {
|
|
305
|
-
rows: 4,
|
|
306
|
-
},
|
|
307
|
-
routing: {
|
|
308
|
-
request: {
|
|
309
|
-
body: {
|
|
310
|
-
instructions: '={{ $value }}',
|
|
311
|
-
},
|
|
312
|
-
},
|
|
313
|
-
},
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
displayName: 'Research ID',
|
|
317
|
-
name: 'researchId',
|
|
318
|
-
type: 'string',
|
|
319
|
-
required: true,
|
|
320
|
-
displayOptions: {
|
|
321
|
-
show: {
|
|
322
|
-
resource: ['research'],
|
|
323
|
-
operation: ['getTask'],
|
|
324
|
-
},
|
|
325
|
-
},
|
|
326
|
-
default: '',
|
|
327
|
-
description: 'The unique identifier of the research request to retrieve',
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
displayName: 'URL',
|
|
331
|
-
name: 'url',
|
|
332
|
-
type: 'string',
|
|
333
|
-
required: true,
|
|
334
|
-
displayOptions: {
|
|
335
|
-
show: {
|
|
336
|
-
resource: ['findSimilar'],
|
|
337
|
-
},
|
|
338
|
-
},
|
|
339
|
-
default: '',
|
|
340
|
-
description: 'The URL to find similar links for',
|
|
341
|
-
routing: {
|
|
342
|
-
request: {
|
|
343
|
-
body: {
|
|
344
|
-
url: '={{ $value }}',
|
|
345
|
-
},
|
|
346
|
-
},
|
|
347
|
-
},
|
|
348
|
-
},
|
|
349
173
|
{
|
|
350
174
|
displayName: 'URLs',
|
|
351
175
|
name: 'urls',
|
|
@@ -357,16 +181,18 @@ class Exa {
|
|
|
357
181
|
},
|
|
358
182
|
},
|
|
359
183
|
default: '',
|
|
360
|
-
description: 'Comma-separated list of URLs to get contents for',
|
|
184
|
+
description: 'Comma-separated list of URLs or IDs to get contents for',
|
|
361
185
|
routing: {
|
|
362
186
|
send: {
|
|
363
187
|
preSend: [
|
|
364
188
|
async function (requestOptions) {
|
|
365
189
|
const urls = this.getNodeParameter('urls', 0);
|
|
366
|
-
const urlArray = urls
|
|
190
|
+
const urlArray = urls
|
|
191
|
+
.split(',')
|
|
192
|
+
.map((url) => url.trim());
|
|
367
193
|
requestOptions.body = {
|
|
368
194
|
...requestOptions.body,
|
|
369
|
-
|
|
195
|
+
ids: urlArray,
|
|
370
196
|
};
|
|
371
197
|
return requestOptions;
|
|
372
198
|
},
|
|
@@ -375,48 +201,39 @@ class Exa {
|
|
|
375
201
|
},
|
|
376
202
|
},
|
|
377
203
|
{
|
|
378
|
-
displayName: 'Search Type',
|
|
379
|
-
name: '
|
|
204
|
+
displayName: 'Deep Search Type',
|
|
205
|
+
name: 'deepSearchType',
|
|
380
206
|
type: 'options',
|
|
381
207
|
displayOptions: {
|
|
382
208
|
show: {
|
|
383
209
|
resource: ['search'],
|
|
384
|
-
operation: ['
|
|
210
|
+
operation: ['deepSearch'],
|
|
385
211
|
},
|
|
386
212
|
},
|
|
387
213
|
options: [
|
|
388
|
-
{
|
|
389
|
-
name: 'Auto',
|
|
390
|
-
value: 'auto',
|
|
391
|
-
description: 'Intelligently combines neural and other search methods',
|
|
392
|
-
},
|
|
393
214
|
{
|
|
394
215
|
name: 'Deep',
|
|
395
216
|
value: 'deep',
|
|
396
217
|
description: 'Deep search with synthesized output (~5s)',
|
|
397
218
|
},
|
|
398
219
|
{
|
|
399
|
-
name: 'Deep
|
|
400
|
-
value: 'deep-
|
|
401
|
-
description: '
|
|
402
|
-
},
|
|
403
|
-
{
|
|
404
|
-
name: 'Fast',
|
|
405
|
-
value: 'fast',
|
|
406
|
-
description: 'Streamlined low-latency search',
|
|
220
|
+
name: 'Deep Lite',
|
|
221
|
+
value: 'deep-lite',
|
|
222
|
+
description: 'Lightweight synthesized output with lower latency',
|
|
407
223
|
},
|
|
408
224
|
{
|
|
409
|
-
name: '
|
|
410
|
-
value: '
|
|
411
|
-
description: '
|
|
225
|
+
name: 'Deep Max',
|
|
226
|
+
value: 'deep-max',
|
|
227
|
+
description: 'Highest-effort deep search mode',
|
|
412
228
|
},
|
|
413
229
|
{
|
|
414
|
-
name: '
|
|
415
|
-
value: '
|
|
416
|
-
description: '
|
|
230
|
+
name: 'Deep Reasoning',
|
|
231
|
+
value: 'deep-reasoning',
|
|
232
|
+
description: 'Deep search with stronger reasoning (~7s)',
|
|
417
233
|
},
|
|
418
234
|
],
|
|
419
|
-
default: '
|
|
235
|
+
default: 'deep',
|
|
236
|
+
description: 'The deep search variant to use',
|
|
420
237
|
routing: {
|
|
421
238
|
request: {
|
|
422
239
|
body: {
|
|
@@ -474,7 +291,10 @@ class Exa {
|
|
|
474
291
|
if (desc) {
|
|
475
292
|
requestOptions.body = {
|
|
476
293
|
...requestOptions.body,
|
|
477
|
-
outputSchema: {
|
|
294
|
+
outputSchema: {
|
|
295
|
+
type: 'text',
|
|
296
|
+
description: desc,
|
|
297
|
+
},
|
|
478
298
|
};
|
|
479
299
|
}
|
|
480
300
|
return requestOptions;
|
|
@@ -485,7 +305,7 @@ class Exa {
|
|
|
485
305
|
},
|
|
486
306
|
{
|
|
487
307
|
displayName: 'Output Schema',
|
|
488
|
-
name: '
|
|
308
|
+
name: 'deepOutputSchema',
|
|
489
309
|
type: 'json',
|
|
490
310
|
required: true,
|
|
491
311
|
displayOptions: {
|
|
@@ -501,12 +321,15 @@ class Exa {
|
|
|
501
321
|
send: {
|
|
502
322
|
preSend: [
|
|
503
323
|
async function (requestOptions) {
|
|
504
|
-
const raw = this.getNodeParameter('
|
|
324
|
+
const raw = this.getNodeParameter('deepOutputSchema', 0);
|
|
505
325
|
if (raw) {
|
|
506
326
|
const parsed = JSON.parse(raw);
|
|
507
327
|
requestOptions.body = {
|
|
508
328
|
...requestOptions.body,
|
|
509
|
-
outputSchema: {
|
|
329
|
+
outputSchema: {
|
|
330
|
+
type: 'object',
|
|
331
|
+
...parsed,
|
|
332
|
+
},
|
|
510
333
|
};
|
|
511
334
|
}
|
|
512
335
|
return requestOptions;
|
|
@@ -533,7 +356,9 @@ class Exa {
|
|
|
533
356
|
async function (requestOptions) {
|
|
534
357
|
const queries = this.getNodeParameter('additionalQueries', 0);
|
|
535
358
|
if (queries) {
|
|
536
|
-
const queryArray = queries
|
|
359
|
+
const queryArray = queries
|
|
360
|
+
.split(',')
|
|
361
|
+
.map((q) => q.trim());
|
|
537
362
|
requestOptions.body = {
|
|
538
363
|
...requestOptions.body,
|
|
539
364
|
additionalQueries: queryArray,
|
|
@@ -546,227 +371,328 @@ class Exa {
|
|
|
546
371
|
},
|
|
547
372
|
},
|
|
548
373
|
{
|
|
549
|
-
displayName: '
|
|
550
|
-
name: '
|
|
551
|
-
type: '
|
|
374
|
+
displayName: 'System Prompt',
|
|
375
|
+
name: 'deepSystemPrompt',
|
|
376
|
+
type: 'string',
|
|
552
377
|
displayOptions: {
|
|
553
378
|
show: {
|
|
554
|
-
resource: ['search'
|
|
379
|
+
resource: ['search'],
|
|
380
|
+
operation: ['deepSearch'],
|
|
555
381
|
},
|
|
556
382
|
},
|
|
383
|
+
default: '',
|
|
384
|
+
description: 'Instructions that guide synthesized output and search planning',
|
|
557
385
|
typeOptions: {
|
|
558
|
-
|
|
559
|
-
maxValue: 100,
|
|
386
|
+
rows: 3,
|
|
560
387
|
},
|
|
561
|
-
default: 10,
|
|
562
|
-
description: 'Number of results to return (max 100)',
|
|
563
388
|
routing: {
|
|
564
389
|
request: {
|
|
565
390
|
body: {
|
|
566
|
-
|
|
391
|
+
systemPrompt: '={{ $value }}',
|
|
567
392
|
},
|
|
568
393
|
},
|
|
569
394
|
},
|
|
570
395
|
},
|
|
571
396
|
{
|
|
572
|
-
displayName: '
|
|
573
|
-
name: '
|
|
574
|
-
type: '
|
|
575
|
-
placeholder: 'Add Option',
|
|
576
|
-
default: {},
|
|
397
|
+
displayName: 'Search Type',
|
|
398
|
+
name: 'type',
|
|
399
|
+
type: 'options',
|
|
577
400
|
displayOptions: {
|
|
578
401
|
show: {
|
|
579
|
-
resource: ['
|
|
402
|
+
resource: ['search'],
|
|
403
|
+
operation: ['search'],
|
|
580
404
|
},
|
|
581
405
|
},
|
|
582
406
|
options: [
|
|
583
407
|
{
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
default: false,
|
|
588
|
-
description: 'Whether to include full text content in the citation results',
|
|
589
|
-
routing: {
|
|
590
|
-
request: {
|
|
591
|
-
body: {
|
|
592
|
-
text: '={{ $value }}',
|
|
593
|
-
},
|
|
594
|
-
},
|
|
595
|
-
},
|
|
408
|
+
name: 'Auto',
|
|
409
|
+
value: 'auto',
|
|
410
|
+
description: 'Intelligently combines neural and other search methods',
|
|
596
411
|
},
|
|
597
412
|
{
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
default: '',
|
|
602
|
-
description: 'JSON Schema to enforce structured answer output instead of a plain string',
|
|
603
|
-
routing: {
|
|
604
|
-
request: {
|
|
605
|
-
body: {
|
|
606
|
-
outputSchema: '={{ JSON.parse($value) }}',
|
|
607
|
-
},
|
|
608
|
-
},
|
|
609
|
-
},
|
|
413
|
+
name: 'Fast',
|
|
414
|
+
value: 'fast',
|
|
415
|
+
description: 'Low-latency optimized search',
|
|
610
416
|
},
|
|
611
417
|
{
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
default: false,
|
|
616
|
-
description: 'Whether to stream the response via Server-Sent Events',
|
|
617
|
-
routing: {
|
|
618
|
-
request: {
|
|
619
|
-
body: {
|
|
620
|
-
stream: '={{ $value }}',
|
|
621
|
-
},
|
|
622
|
-
},
|
|
623
|
-
},
|
|
418
|
+
name: 'Instant',
|
|
419
|
+
value: 'instant',
|
|
420
|
+
description: 'Lowest latency embeddings-based search (~150ms)',
|
|
624
421
|
},
|
|
625
422
|
],
|
|
423
|
+
default: 'auto',
|
|
424
|
+
routing: {
|
|
425
|
+
request: {
|
|
426
|
+
body: {
|
|
427
|
+
type: '={{ $value }}',
|
|
428
|
+
},
|
|
429
|
+
},
|
|
430
|
+
},
|
|
626
431
|
},
|
|
627
432
|
{
|
|
628
|
-
displayName: '
|
|
629
|
-
name: '
|
|
433
|
+
displayName: 'Number of Results',
|
|
434
|
+
name: 'numResults',
|
|
435
|
+
type: 'number',
|
|
436
|
+
displayOptions: {
|
|
437
|
+
show: {
|
|
438
|
+
resource: ['search'],
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
typeOptions: {
|
|
442
|
+
minValue: 1,
|
|
443
|
+
maxValue: 100,
|
|
444
|
+
},
|
|
445
|
+
default: 10,
|
|
446
|
+
description: 'Number of results to return (max 100)',
|
|
447
|
+
routing: {
|
|
448
|
+
request: {
|
|
449
|
+
body: {
|
|
450
|
+
numResults: '={{ $value }}',
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
|
+
},
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
displayName: 'Additional Fields',
|
|
457
|
+
name: 'additionalFields',
|
|
630
458
|
type: 'collection',
|
|
631
|
-
placeholder: 'Add
|
|
459
|
+
placeholder: 'Add Field',
|
|
632
460
|
default: {},
|
|
633
461
|
displayOptions: {
|
|
634
462
|
show: {
|
|
635
|
-
resource: ['
|
|
636
|
-
operation: ['
|
|
463
|
+
resource: ['search'],
|
|
464
|
+
operation: ['search'],
|
|
637
465
|
},
|
|
638
466
|
},
|
|
639
467
|
options: [
|
|
640
468
|
{
|
|
641
|
-
displayName: '
|
|
642
|
-
name: '
|
|
469
|
+
displayName: 'Category',
|
|
470
|
+
name: 'category',
|
|
643
471
|
type: 'options',
|
|
644
472
|
options: [
|
|
473
|
+
{ name: 'Company', value: 'company' },
|
|
645
474
|
{
|
|
646
|
-
name: '
|
|
647
|
-
value: '
|
|
648
|
-
description: 'Fastest research model',
|
|
475
|
+
name: 'Financial Report',
|
|
476
|
+
value: 'financial report',
|
|
649
477
|
},
|
|
478
|
+
{ name: 'News', value: 'news' },
|
|
479
|
+
{ name: 'People', value: 'people' },
|
|
650
480
|
{
|
|
651
|
-
name: '
|
|
652
|
-
value: '
|
|
653
|
-
description: 'Balanced speed and quality',
|
|
481
|
+
name: 'Personal Site',
|
|
482
|
+
value: 'personal site',
|
|
654
483
|
},
|
|
655
484
|
{
|
|
656
|
-
name: '
|
|
657
|
-
value: '
|
|
658
|
-
description: 'Most thorough analysis and stronger reasoning',
|
|
485
|
+
name: 'Research Paper',
|
|
486
|
+
value: 'research paper',
|
|
659
487
|
},
|
|
488
|
+
{ name: 'Tweet', value: 'tweet' },
|
|
660
489
|
],
|
|
661
|
-
default: '
|
|
662
|
-
description: '
|
|
490
|
+
default: 'company',
|
|
491
|
+
description: 'A data category to focus on',
|
|
663
492
|
routing: {
|
|
664
493
|
request: {
|
|
665
494
|
body: {
|
|
666
|
-
|
|
495
|
+
category: '={{ $value }}',
|
|
667
496
|
},
|
|
668
497
|
},
|
|
669
498
|
},
|
|
670
499
|
},
|
|
671
500
|
{
|
|
672
|
-
displayName: '
|
|
673
|
-
name: '
|
|
674
|
-
type: '
|
|
501
|
+
displayName: 'End Published Date',
|
|
502
|
+
name: 'endPublishedDate',
|
|
503
|
+
type: 'dateTime',
|
|
675
504
|
default: '',
|
|
676
|
-
description: '
|
|
505
|
+
description: 'Only return links published before this date',
|
|
677
506
|
routing: {
|
|
678
507
|
request: {
|
|
679
508
|
body: {
|
|
680
|
-
|
|
509
|
+
endPublishedDate: '={{ new Date($value).toISOString() }}',
|
|
681
510
|
},
|
|
682
511
|
},
|
|
683
512
|
},
|
|
684
513
|
},
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
514
|
+
{
|
|
515
|
+
displayName: 'Exclude Domains',
|
|
516
|
+
name: 'excludeDomains',
|
|
517
|
+
type: 'string',
|
|
518
|
+
default: '',
|
|
519
|
+
description: 'Comma-separated list of domains to exclude',
|
|
520
|
+
routing: {
|
|
521
|
+
send: {
|
|
522
|
+
preSend: [
|
|
523
|
+
async function (requestOptions) {
|
|
524
|
+
const domains = this.getNodeParameter('additionalFields.excludeDomains', 0);
|
|
525
|
+
if (domains) {
|
|
526
|
+
const domainArray = domains
|
|
527
|
+
.split(',')
|
|
528
|
+
.map((d) => d.trim());
|
|
529
|
+
requestOptions.body = {
|
|
530
|
+
...requestOptions.body,
|
|
531
|
+
excludeDomains: domainArray,
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
return requestOptions;
|
|
535
|
+
},
|
|
536
|
+
],
|
|
537
|
+
},
|
|
538
|
+
},
|
|
697
539
|
},
|
|
698
|
-
},
|
|
699
|
-
options: [
|
|
700
540
|
{
|
|
701
|
-
displayName: '
|
|
702
|
-
name: '
|
|
703
|
-
type: '
|
|
704
|
-
default:
|
|
705
|
-
description: '
|
|
541
|
+
displayName: 'Exclude Text',
|
|
542
|
+
name: 'excludeText',
|
|
543
|
+
type: 'string',
|
|
544
|
+
default: '',
|
|
545
|
+
description: 'Text that must not be present in webpage (comma-separated, max 5 words each)',
|
|
706
546
|
routing: {
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
547
|
+
send: {
|
|
548
|
+
preSend: [
|
|
549
|
+
async function (requestOptions) {
|
|
550
|
+
const text = this.getNodeParameter('additionalFields.excludeText', 0);
|
|
551
|
+
if (text) {
|
|
552
|
+
const textArray = text
|
|
553
|
+
.split(',')
|
|
554
|
+
.map((t) => t.trim());
|
|
555
|
+
requestOptions.body = {
|
|
556
|
+
...requestOptions.body,
|
|
557
|
+
excludeText: textArray,
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
return requestOptions;
|
|
561
|
+
},
|
|
562
|
+
],
|
|
711
563
|
},
|
|
712
564
|
},
|
|
713
565
|
},
|
|
714
566
|
{
|
|
715
|
-
displayName: '
|
|
716
|
-
name: '
|
|
567
|
+
displayName: 'Include Domains',
|
|
568
|
+
name: 'includeDomains',
|
|
569
|
+
type: 'string',
|
|
570
|
+
default: '',
|
|
571
|
+
description: 'Comma-separated list of domains to include (e.g., arxiv.org, github.com)',
|
|
572
|
+
routing: {
|
|
573
|
+
send: {
|
|
574
|
+
preSend: [
|
|
575
|
+
async function (requestOptions) {
|
|
576
|
+
const domains = this.getNodeParameter('additionalFields.includeDomains', 0);
|
|
577
|
+
if (domains) {
|
|
578
|
+
const domainArray = domains
|
|
579
|
+
.split(',')
|
|
580
|
+
.map((d) => d.trim());
|
|
581
|
+
requestOptions.body = {
|
|
582
|
+
...requestOptions.body,
|
|
583
|
+
includeDomains: domainArray,
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
return requestOptions;
|
|
587
|
+
},
|
|
588
|
+
],
|
|
589
|
+
},
|
|
590
|
+
},
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
displayName: 'Include Text',
|
|
594
|
+
name: 'includeText',
|
|
595
|
+
type: 'string',
|
|
596
|
+
default: '',
|
|
597
|
+
description: 'Text that must be present in webpage (comma-separated, max 5 words each)',
|
|
598
|
+
routing: {
|
|
599
|
+
send: {
|
|
600
|
+
preSend: [
|
|
601
|
+
async function (requestOptions) {
|
|
602
|
+
const text = this.getNodeParameter('additionalFields.includeText', 0);
|
|
603
|
+
if (text) {
|
|
604
|
+
const textArray = text
|
|
605
|
+
.split(',')
|
|
606
|
+
.map((t) => t.trim());
|
|
607
|
+
requestOptions.body = {
|
|
608
|
+
...requestOptions.body,
|
|
609
|
+
includeText: textArray,
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
return requestOptions;
|
|
613
|
+
},
|
|
614
|
+
],
|
|
615
|
+
},
|
|
616
|
+
},
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
displayName: 'Moderation',
|
|
620
|
+
name: 'moderation',
|
|
717
621
|
type: 'boolean',
|
|
718
622
|
default: false,
|
|
719
|
-
description: 'Whether to
|
|
623
|
+
description: 'Whether to filter unsafe content from results',
|
|
720
624
|
routing: {
|
|
721
625
|
request: {
|
|
722
|
-
|
|
723
|
-
|
|
626
|
+
body: {
|
|
627
|
+
moderation: '={{ $value }}',
|
|
724
628
|
},
|
|
725
629
|
},
|
|
726
630
|
},
|
|
727
631
|
},
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
632
|
+
{
|
|
633
|
+
displayName: 'Output Schema',
|
|
634
|
+
name: 'outputSchema',
|
|
635
|
+
type: 'json',
|
|
636
|
+
default: '',
|
|
637
|
+
description: 'JSON Schema to enforce structured output with grounded citations',
|
|
638
|
+
routing: {
|
|
639
|
+
send: {
|
|
640
|
+
preSend: [
|
|
641
|
+
async function (requestOptions) {
|
|
642
|
+
const schema = this.getNodeParameter('additionalFields.outputSchema', 0);
|
|
643
|
+
if (schema) {
|
|
644
|
+
requestOptions.body = {
|
|
645
|
+
...requestOptions.body,
|
|
646
|
+
outputSchema: JSON.parse(schema),
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
return requestOptions;
|
|
650
|
+
},
|
|
651
|
+
],
|
|
652
|
+
},
|
|
653
|
+
},
|
|
740
654
|
},
|
|
741
|
-
},
|
|
742
|
-
options: [
|
|
743
655
|
{
|
|
744
|
-
displayName: '
|
|
745
|
-
name: '
|
|
746
|
-
type: '
|
|
656
|
+
displayName: 'Start Published Date',
|
|
657
|
+
name: 'startPublishedDate',
|
|
658
|
+
type: 'dateTime',
|
|
747
659
|
default: '',
|
|
748
|
-
description: '
|
|
660
|
+
description: 'Only return links published after this date',
|
|
749
661
|
routing: {
|
|
750
662
|
request: {
|
|
751
|
-
|
|
752
|
-
|
|
663
|
+
body: {
|
|
664
|
+
startPublishedDate: '={{ new Date($value).toISOString() }}',
|
|
753
665
|
},
|
|
754
666
|
},
|
|
755
667
|
},
|
|
756
668
|
},
|
|
757
669
|
{
|
|
758
|
-
displayName: '
|
|
759
|
-
name: '
|
|
760
|
-
type: '
|
|
761
|
-
default:
|
|
670
|
+
displayName: 'System Prompt',
|
|
671
|
+
name: 'systemPrompt',
|
|
672
|
+
type: 'string',
|
|
673
|
+
default: '',
|
|
674
|
+
description: 'Instructions that guide synthesized output when outputSchema is provided',
|
|
762
675
|
typeOptions: {
|
|
763
|
-
|
|
676
|
+
rows: 3,
|
|
764
677
|
},
|
|
765
|
-
description: 'Max number of results to return',
|
|
766
678
|
routing: {
|
|
767
679
|
request: {
|
|
768
|
-
|
|
769
|
-
|
|
680
|
+
body: {
|
|
681
|
+
systemPrompt: '={{ $value }}',
|
|
682
|
+
},
|
|
683
|
+
},
|
|
684
|
+
},
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
displayName: 'User Location',
|
|
688
|
+
name: 'userLocation',
|
|
689
|
+
type: 'string',
|
|
690
|
+
default: '',
|
|
691
|
+
description: 'Two-letter ISO country code (e.g., US, GB)',
|
|
692
|
+
routing: {
|
|
693
|
+
request: {
|
|
694
|
+
body: {
|
|
695
|
+
userLocation: '={{ $value }}',
|
|
770
696
|
},
|
|
771
697
|
},
|
|
772
698
|
},
|
|
@@ -775,13 +701,14 @@ class Exa {
|
|
|
775
701
|
},
|
|
776
702
|
{
|
|
777
703
|
displayName: 'Additional Fields',
|
|
778
|
-
name: '
|
|
704
|
+
name: 'deepAdditionalFields',
|
|
779
705
|
type: 'collection',
|
|
780
706
|
placeholder: 'Add Field',
|
|
781
707
|
default: {},
|
|
782
708
|
displayOptions: {
|
|
783
709
|
show: {
|
|
784
710
|
resource: ['search'],
|
|
711
|
+
operation: ['deepSearch'],
|
|
785
712
|
},
|
|
786
713
|
},
|
|
787
714
|
options: [
|
|
@@ -791,11 +718,21 @@ class Exa {
|
|
|
791
718
|
type: 'options',
|
|
792
719
|
options: [
|
|
793
720
|
{ name: 'Company', value: 'company' },
|
|
794
|
-
{
|
|
721
|
+
{
|
|
722
|
+
name: 'Financial Report',
|
|
723
|
+
value: 'financial report',
|
|
724
|
+
},
|
|
795
725
|
{ name: 'News', value: 'news' },
|
|
796
726
|
{ name: 'People', value: 'people' },
|
|
797
|
-
{
|
|
798
|
-
|
|
727
|
+
{
|
|
728
|
+
name: 'Personal Site',
|
|
729
|
+
value: 'personal site',
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
name: 'Research Paper',
|
|
733
|
+
value: 'research paper',
|
|
734
|
+
},
|
|
735
|
+
{ name: 'Tweet', value: 'tweet' },
|
|
799
736
|
],
|
|
800
737
|
default: 'company',
|
|
801
738
|
description: 'A data category to focus on',
|
|
@@ -807,34 +744,6 @@ class Exa {
|
|
|
807
744
|
},
|
|
808
745
|
},
|
|
809
746
|
},
|
|
810
|
-
{
|
|
811
|
-
displayName: 'End Crawl Date',
|
|
812
|
-
name: 'endCrawlDate',
|
|
813
|
-
type: 'dateTime',
|
|
814
|
-
default: '',
|
|
815
|
-
description: 'Only return links crawled by Exa before this date',
|
|
816
|
-
routing: {
|
|
817
|
-
request: {
|
|
818
|
-
body: {
|
|
819
|
-
endCrawlDate: '={{ new Date($value).toISOString() }}',
|
|
820
|
-
},
|
|
821
|
-
},
|
|
822
|
-
},
|
|
823
|
-
},
|
|
824
|
-
{
|
|
825
|
-
displayName: 'End Published Date',
|
|
826
|
-
name: 'endPublishedDate',
|
|
827
|
-
type: 'dateTime',
|
|
828
|
-
default: '',
|
|
829
|
-
description: 'Only return links published before this date',
|
|
830
|
-
routing: {
|
|
831
|
-
request: {
|
|
832
|
-
body: {
|
|
833
|
-
endPublishedDate: '={{ new Date($value).toISOString() }}',
|
|
834
|
-
},
|
|
835
|
-
},
|
|
836
|
-
},
|
|
837
|
-
},
|
|
838
747
|
{
|
|
839
748
|
displayName: 'Exclude Domains',
|
|
840
749
|
name: 'excludeDomains',
|
|
@@ -845,9 +754,11 @@ class Exa {
|
|
|
845
754
|
send: {
|
|
846
755
|
preSend: [
|
|
847
756
|
async function (requestOptions) {
|
|
848
|
-
const domains = this.getNodeParameter('
|
|
757
|
+
const domains = this.getNodeParameter('deepAdditionalFields.excludeDomains', 0);
|
|
849
758
|
if (domains) {
|
|
850
|
-
const domainArray = domains
|
|
759
|
+
const domainArray = domains
|
|
760
|
+
.split(',')
|
|
761
|
+
.map((d) => d.trim());
|
|
851
762
|
requestOptions.body = {
|
|
852
763
|
...requestOptions.body,
|
|
853
764
|
excludeDomains: domainArray,
|
|
@@ -859,43 +770,21 @@ class Exa {
|
|
|
859
770
|
},
|
|
860
771
|
},
|
|
861
772
|
},
|
|
862
|
-
{
|
|
863
|
-
displayName: 'Exclude Text',
|
|
864
|
-
name: 'excludeText',
|
|
865
|
-
type: 'string',
|
|
866
|
-
default: '',
|
|
867
|
-
description: 'Text that must not be present in webpage (comma-separated, max 5 words each)',
|
|
868
|
-
routing: {
|
|
869
|
-
send: {
|
|
870
|
-
preSend: [
|
|
871
|
-
async function (requestOptions) {
|
|
872
|
-
const text = this.getNodeParameter('additionalFields.excludeText', 0);
|
|
873
|
-
if (text) {
|
|
874
|
-
const textArray = text.split(',').map((t) => t.trim());
|
|
875
|
-
requestOptions.body = {
|
|
876
|
-
...requestOptions.body,
|
|
877
|
-
excludeText: textArray,
|
|
878
|
-
};
|
|
879
|
-
}
|
|
880
|
-
return requestOptions;
|
|
881
|
-
},
|
|
882
|
-
],
|
|
883
|
-
},
|
|
884
|
-
},
|
|
885
|
-
},
|
|
886
773
|
{
|
|
887
774
|
displayName: 'Include Domains',
|
|
888
775
|
name: 'includeDomains',
|
|
889
776
|
type: 'string',
|
|
890
777
|
default: '',
|
|
891
|
-
description: 'Comma-separated list of domains to include
|
|
778
|
+
description: 'Comma-separated list of domains to include',
|
|
892
779
|
routing: {
|
|
893
780
|
send: {
|
|
894
781
|
preSend: [
|
|
895
782
|
async function (requestOptions) {
|
|
896
|
-
const domains = this.getNodeParameter('
|
|
783
|
+
const domains = this.getNodeParameter('deepAdditionalFields.includeDomains', 0);
|
|
897
784
|
if (domains) {
|
|
898
|
-
const domainArray = domains
|
|
785
|
+
const domainArray = domains
|
|
786
|
+
.split(',')
|
|
787
|
+
.map((d) => d.trim());
|
|
899
788
|
requestOptions.body = {
|
|
900
789
|
...requestOptions.body,
|
|
901
790
|
includeDomains: domainArray,
|
|
@@ -907,36 +796,12 @@ class Exa {
|
|
|
907
796
|
},
|
|
908
797
|
},
|
|
909
798
|
},
|
|
910
|
-
{
|
|
911
|
-
displayName: 'Include Text',
|
|
912
|
-
name: 'includeText',
|
|
913
|
-
type: 'string',
|
|
914
|
-
default: '',
|
|
915
|
-
description: 'Text that must be present in webpage (comma-separated, max 5 words each)',
|
|
916
|
-
routing: {
|
|
917
|
-
send: {
|
|
918
|
-
preSend: [
|
|
919
|
-
async function (requestOptions) {
|
|
920
|
-
const text = this.getNodeParameter('additionalFields.includeText', 0);
|
|
921
|
-
if (text) {
|
|
922
|
-
const textArray = text.split(',').map((t) => t.trim());
|
|
923
|
-
requestOptions.body = {
|
|
924
|
-
...requestOptions.body,
|
|
925
|
-
includeText: textArray,
|
|
926
|
-
};
|
|
927
|
-
}
|
|
928
|
-
return requestOptions;
|
|
929
|
-
},
|
|
930
|
-
],
|
|
931
|
-
},
|
|
932
|
-
},
|
|
933
|
-
},
|
|
934
799
|
{
|
|
935
800
|
displayName: 'Moderation',
|
|
936
801
|
name: 'moderation',
|
|
937
802
|
type: 'boolean',
|
|
938
803
|
default: false,
|
|
939
|
-
description: 'Whether to
|
|
804
|
+
description: 'Whether to filter unsafe content from results',
|
|
940
805
|
routing: {
|
|
941
806
|
request: {
|
|
942
807
|
body: {
|
|
@@ -946,43 +811,69 @@ class Exa {
|
|
|
946
811
|
},
|
|
947
812
|
},
|
|
948
813
|
{
|
|
949
|
-
displayName: '
|
|
950
|
-
name: '
|
|
951
|
-
type: '
|
|
814
|
+
displayName: 'User Location',
|
|
815
|
+
name: 'userLocation',
|
|
816
|
+
type: 'string',
|
|
952
817
|
default: '',
|
|
953
|
-
description: '
|
|
818
|
+
description: 'Two-letter ISO country code (e.g., US, GB)',
|
|
954
819
|
routing: {
|
|
955
820
|
request: {
|
|
956
821
|
body: {
|
|
957
|
-
|
|
822
|
+
userLocation: '={{ $value }}',
|
|
958
823
|
},
|
|
959
824
|
},
|
|
960
825
|
},
|
|
961
826
|
},
|
|
827
|
+
],
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
displayName: 'Additional Options',
|
|
831
|
+
name: 'answerOptions',
|
|
832
|
+
type: 'collection',
|
|
833
|
+
placeholder: 'Add Option',
|
|
834
|
+
default: {},
|
|
835
|
+
displayOptions: {
|
|
836
|
+
show: {
|
|
837
|
+
resource: ['answer'],
|
|
838
|
+
},
|
|
839
|
+
},
|
|
840
|
+
options: [
|
|
962
841
|
{
|
|
963
|
-
displayName: '
|
|
964
|
-
name: '
|
|
965
|
-
type: '
|
|
842
|
+
displayName: 'Output Schema',
|
|
843
|
+
name: 'outputSchema',
|
|
844
|
+
type: 'json',
|
|
966
845
|
default: '',
|
|
967
|
-
description: '
|
|
846
|
+
description: 'JSON Schema to enforce structured output',
|
|
968
847
|
routing: {
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
848
|
+
send: {
|
|
849
|
+
preSend: [
|
|
850
|
+
async function (requestOptions) {
|
|
851
|
+
const schema = this.getNodeParameter('answerOptions.outputSchema', 0);
|
|
852
|
+
if (schema) {
|
|
853
|
+
requestOptions.body = {
|
|
854
|
+
...requestOptions.body,
|
|
855
|
+
outputSchema: JSON.parse(schema),
|
|
856
|
+
};
|
|
857
|
+
}
|
|
858
|
+
return requestOptions;
|
|
859
|
+
},
|
|
860
|
+
],
|
|
973
861
|
},
|
|
974
862
|
},
|
|
975
863
|
},
|
|
976
864
|
{
|
|
977
|
-
displayName: '
|
|
978
|
-
name: '
|
|
865
|
+
displayName: 'System Prompt',
|
|
866
|
+
name: 'systemPrompt',
|
|
979
867
|
type: 'string',
|
|
980
868
|
default: '',
|
|
981
|
-
description: '
|
|
869
|
+
description: 'Instructions that guide the answer generation',
|
|
870
|
+
typeOptions: {
|
|
871
|
+
rows: 3,
|
|
872
|
+
},
|
|
982
873
|
routing: {
|
|
983
874
|
request: {
|
|
984
875
|
body: {
|
|
985
|
-
|
|
876
|
+
systemPrompt: '={{ $value }}',
|
|
986
877
|
},
|
|
987
878
|
},
|
|
988
879
|
},
|
|
@@ -997,7 +888,7 @@ class Exa {
|
|
|
997
888
|
default: {},
|
|
998
889
|
displayOptions: {
|
|
999
890
|
show: {
|
|
1000
|
-
resource: ['search', 'contents'
|
|
891
|
+
resource: ['search', 'contents'],
|
|
1001
892
|
},
|
|
1002
893
|
},
|
|
1003
894
|
routing: {
|
|
@@ -1005,82 +896,48 @@ class Exa {
|
|
|
1005
896
|
preSend: [
|
|
1006
897
|
async function (requestOptions) {
|
|
1007
898
|
const contentsOptions = this.getNodeParameter('contentsOptions', 0, {});
|
|
1008
|
-
const contents = {
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
if (
|
|
1012
|
-
|
|
1013
|
-
if (contentsOptions.textMaxCharacters !== undefined && contentsOptions.textMaxCharacters > 0) {
|
|
1014
|
-
textObj.maxCharacters = contentsOptions.textMaxCharacters;
|
|
1015
|
-
}
|
|
1016
|
-
if (contentsOptions.textIncludeHtmlTags === true) {
|
|
1017
|
-
textObj.includeHtmlTags = true;
|
|
1018
|
-
}
|
|
1019
|
-
contents.text = textObj;
|
|
1020
|
-
}
|
|
1021
|
-
else if (contentsOptions.text !== undefined) {
|
|
1022
|
-
contents.text = contentsOptions.text;
|
|
1023
|
-
}
|
|
1024
|
-
const hasHighlightsAdvanced = (contentsOptions.highlightsMaxCharacters !== undefined && contentsOptions.highlightsMaxCharacters > 0) ||
|
|
1025
|
-
(contentsOptions.highlightsQuery !== undefined && contentsOptions.highlightsQuery !== '');
|
|
1026
|
-
if (hasHighlightsAdvanced) {
|
|
1027
|
-
const hlObj = {};
|
|
1028
|
-
if (contentsOptions.highlightsMaxCharacters !== undefined && contentsOptions.highlightsMaxCharacters > 0) {
|
|
1029
|
-
hlObj.maxCharacters = contentsOptions.highlightsMaxCharacters;
|
|
1030
|
-
}
|
|
1031
|
-
if (contentsOptions.highlightsQuery !== undefined && contentsOptions.highlightsQuery !== '') {
|
|
1032
|
-
hlObj.query = contentsOptions.highlightsQuery;
|
|
1033
|
-
}
|
|
1034
|
-
contents.highlights = hlObj;
|
|
899
|
+
const contents = {
|
|
900
|
+
highlights: true,
|
|
901
|
+
};
|
|
902
|
+
if (contentsOptions.highlights === false) {
|
|
903
|
+
delete contents.highlights;
|
|
1035
904
|
}
|
|
1036
|
-
else if (contentsOptions.
|
|
1037
|
-
contents.highlights =
|
|
905
|
+
else if (contentsOptions.highlightsMaxCharacters) {
|
|
906
|
+
contents.highlights = {
|
|
907
|
+
maxCharacters: contentsOptions.highlightsMaxCharacters,
|
|
908
|
+
};
|
|
1038
909
|
}
|
|
1039
|
-
if (contentsOptions.
|
|
1040
|
-
contents.
|
|
910
|
+
if (contentsOptions.text) {
|
|
911
|
+
contents.text =
|
|
912
|
+
contentsOptions.textMaxCharacters
|
|
913
|
+
? {
|
|
914
|
+
maxCharacters: contentsOptions.textMaxCharacters,
|
|
915
|
+
}
|
|
916
|
+
: true;
|
|
1041
917
|
}
|
|
1042
|
-
|
|
1043
|
-
contents.summary =
|
|
918
|
+
if (contentsOptions.summary) {
|
|
919
|
+
contents.summary = true;
|
|
1044
920
|
}
|
|
1045
921
|
if (contentsOptions.livecrawl !== undefined) {
|
|
1046
|
-
contents.livecrawl =
|
|
1047
|
-
|
|
1048
|
-
if (contentsOptions.livecrawlTimeout !== undefined && contentsOptions.livecrawlTimeout > 0) {
|
|
1049
|
-
contents.livecrawlTimeout = contentsOptions.livecrawlTimeout;
|
|
1050
|
-
}
|
|
1051
|
-
if (contentsOptions.maxAgeHours !== undefined) {
|
|
1052
|
-
contents.maxAgeHours = contentsOptions.maxAgeHours;
|
|
1053
|
-
}
|
|
1054
|
-
if (contentsOptions.subpages !== undefined && contentsOptions.subpages > 0) {
|
|
1055
|
-
contents.subpages = contentsOptions.subpages;
|
|
1056
|
-
}
|
|
1057
|
-
if (contentsOptions.subpageTarget !== undefined && contentsOptions.subpageTarget !== '') {
|
|
1058
|
-
contents.subpageTarget = contentsOptions.subpageTarget;
|
|
1059
|
-
}
|
|
1060
|
-
const extras = {};
|
|
1061
|
-
if (contentsOptions.links !== undefined && contentsOptions.links > 0) {
|
|
1062
|
-
extras.links = contentsOptions.links;
|
|
922
|
+
contents.livecrawl =
|
|
923
|
+
contentsOptions.livecrawl;
|
|
1063
924
|
}
|
|
1064
|
-
if (contentsOptions.
|
|
1065
|
-
|
|
925
|
+
if (contentsOptions.subpages !== undefined &&
|
|
926
|
+
contentsOptions.subpages > 0) {
|
|
927
|
+
contents.subpages =
|
|
928
|
+
contentsOptions.subpages;
|
|
1066
929
|
}
|
|
1067
|
-
if (
|
|
1068
|
-
|
|
930
|
+
if (contentsOptions.imageLinks !== undefined &&
|
|
931
|
+
contentsOptions.imageLinks > 0) {
|
|
932
|
+
contents.extras = {
|
|
933
|
+
imageLinks: contentsOptions.imageLinks,
|
|
934
|
+
};
|
|
1069
935
|
}
|
|
1070
936
|
if (Object.keys(contents).length > 0) {
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
...contents,
|
|
1076
|
-
};
|
|
1077
|
-
}
|
|
1078
|
-
else {
|
|
1079
|
-
requestOptions.body = {
|
|
1080
|
-
...requestOptions.body,
|
|
1081
|
-
contents,
|
|
1082
|
-
};
|
|
1083
|
-
}
|
|
937
|
+
requestOptions.body = {
|
|
938
|
+
...requestOptions.body,
|
|
939
|
+
contents,
|
|
940
|
+
};
|
|
1084
941
|
}
|
|
1085
942
|
return requestOptions;
|
|
1086
943
|
},
|
|
@@ -1092,81 +949,41 @@ class Exa {
|
|
|
1092
949
|
displayName: 'Highlights',
|
|
1093
950
|
name: 'highlights',
|
|
1094
951
|
type: 'boolean',
|
|
1095
|
-
default:
|
|
1096
|
-
description: 'Whether to include highlighted excerpts',
|
|
952
|
+
default: true,
|
|
953
|
+
description: 'Whether to include highlighted excerpts (enabled by default)',
|
|
1097
954
|
},
|
|
1098
955
|
{
|
|
1099
956
|
displayName: 'Highlights Max Characters',
|
|
1100
957
|
name: 'highlightsMaxCharacters',
|
|
1101
958
|
type: 'number',
|
|
1102
959
|
default: 0,
|
|
1103
|
-
typeOptions: { minValue: 0 },
|
|
1104
|
-
description: 'Maximum characters for highlights (overrides the boolean toggle when > 0)',
|
|
1105
|
-
},
|
|
1106
|
-
{
|
|
1107
|
-
displayName: 'Highlights Query',
|
|
1108
|
-
name: 'highlightsQuery',
|
|
1109
|
-
type: 'string',
|
|
1110
|
-
default: '',
|
|
1111
|
-
description: 'Custom query to direct highlight selection',
|
|
1112
|
-
},
|
|
1113
|
-
{
|
|
1114
|
-
displayName: 'Image Links',
|
|
1115
|
-
name: 'imageLinks',
|
|
1116
|
-
type: 'number',
|
|
1117
|
-
default: 0,
|
|
1118
960
|
typeOptions: {
|
|
1119
961
|
minValue: 0,
|
|
1120
|
-
maxValue: 10,
|
|
1121
962
|
},
|
|
1122
|
-
description: '
|
|
963
|
+
description: 'Maximum character length for highlights (0 for no limit)',
|
|
1123
964
|
},
|
|
1124
965
|
{
|
|
1125
|
-
displayName: 'Links',
|
|
1126
|
-
name: '
|
|
966
|
+
displayName: 'Image Links',
|
|
967
|
+
name: 'imageLinks',
|
|
1127
968
|
type: 'number',
|
|
1128
969
|
default: 0,
|
|
1129
970
|
typeOptions: {
|
|
1130
971
|
minValue: 0,
|
|
1131
972
|
maxValue: 10,
|
|
1132
973
|
},
|
|
1133
|
-
description: 'Number of
|
|
974
|
+
description: 'Number of image URLs to return per result (0-10)',
|
|
1134
975
|
},
|
|
1135
976
|
{
|
|
1136
|
-
displayName: 'Livecrawl
|
|
977
|
+
displayName: 'Livecrawl',
|
|
1137
978
|
name: 'livecrawl',
|
|
1138
979
|
type: 'options',
|
|
1139
980
|
options: [
|
|
1140
981
|
{ name: 'Always', value: 'always' },
|
|
1141
|
-
{ name: 'Preferred', value: 'preferred' },
|
|
1142
|
-
{ name: 'Fallback', value: 'fallback' },
|
|
1143
982
|
{ name: 'Never', value: 'never' },
|
|
983
|
+
{ name: 'Fallback', value: 'fallback' },
|
|
1144
984
|
],
|
|
1145
985
|
default: 'fallback',
|
|
1146
|
-
description: '
|
|
1147
|
-
},
|
|
1148
|
-
{
|
|
1149
|
-
displayName: 'Livecrawl Timeout',
|
|
1150
|
-
name: 'livecrawlTimeout',
|
|
1151
|
-
type: 'number',
|
|
1152
|
-
default: 10000,
|
|
1153
|
-
typeOptions: { minValue: 1000 },
|
|
1154
|
-
description: 'Timeout for livecrawling in milliseconds',
|
|
1155
|
-
},
|
|
1156
|
-
{
|
|
1157
|
-
displayName: 'Max Age Hours',
|
|
1158
|
-
name: 'maxAgeHours',
|
|
1159
|
-
type: 'number',
|
|
1160
|
-
default: 24,
|
|
1161
|
-
typeOptions: { minValue: -1 },
|
|
1162
|
-
description: 'Max age of cached content in hours. 0 = always livecrawl, -1 = always use cache, 24 = recommended default.',
|
|
1163
|
-
},
|
|
1164
|
-
{
|
|
1165
|
-
displayName: 'Subpage Target',
|
|
1166
|
-
name: 'subpageTarget',
|
|
1167
|
-
type: 'string',
|
|
1168
|
-
default: '',
|
|
1169
|
-
description: 'Keyword(s) to find specific subpages (e.g., "sources", "references")',
|
|
986
|
+
description: 'Whether to crawl the page in real-time',
|
|
1170
987
|
},
|
|
1171
988
|
{
|
|
1172
989
|
displayName: 'Subpages',
|
|
@@ -1186,34 +1003,22 @@ class Exa {
|
|
|
1186
1003
|
default: false,
|
|
1187
1004
|
description: 'Whether to include an AI-generated summary',
|
|
1188
1005
|
},
|
|
1189
|
-
{
|
|
1190
|
-
displayName: 'Summary Query',
|
|
1191
|
-
name: 'summaryQuery',
|
|
1192
|
-
type: 'string',
|
|
1193
|
-
default: '',
|
|
1194
|
-
description: 'Custom query for the LLM-generated summary (overrides the boolean toggle)',
|
|
1195
|
-
},
|
|
1196
1006
|
{
|
|
1197
1007
|
displayName: 'Text',
|
|
1198
1008
|
name: 'text',
|
|
1199
1009
|
type: 'boolean',
|
|
1200
1010
|
default: false,
|
|
1201
|
-
description: 'Whether to include cleaned text from the page',
|
|
1202
|
-
},
|
|
1203
|
-
{
|
|
1204
|
-
displayName: 'Text Include HTML Tags',
|
|
1205
|
-
name: 'textIncludeHtmlTags',
|
|
1206
|
-
type: 'boolean',
|
|
1207
|
-
default: false,
|
|
1208
|
-
description: 'Whether to include HTML tags in text output for structure understanding',
|
|
1011
|
+
description: 'Whether to include full cleaned text from the page',
|
|
1209
1012
|
},
|
|
1210
1013
|
{
|
|
1211
1014
|
displayName: 'Text Max Characters',
|
|
1212
1015
|
name: 'textMaxCharacters',
|
|
1213
1016
|
type: 'number',
|
|
1214
1017
|
default: 0,
|
|
1215
|
-
typeOptions: {
|
|
1216
|
-
|
|
1018
|
+
typeOptions: {
|
|
1019
|
+
minValue: 0,
|
|
1020
|
+
},
|
|
1021
|
+
description: 'Maximum character length for text content (0 for no limit)',
|
|
1217
1022
|
},
|
|
1218
1023
|
],
|
|
1219
1024
|
},
|