File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
libs/langchain-tavily/src Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,20 @@ export type TavilySearchAPIRetrieverFields = ToolParams & {
105
105
*/
106
106
includeFavicon ?: boolean ;
107
107
108
+ /**
109
+ * Filters search results to include only content published on or after this date.
110
+ *
111
+ * @default undefined
112
+ */
113
+ startDate ?: string ;
114
+
115
+ /**
116
+ * Filters search results to include only content published on or before this date.
117
+ *
118
+ * @default undefined
119
+ */
120
+ endDate ?: string ;
121
+
108
122
/**
109
123
* The name of the tool.
110
124
*
@@ -348,6 +362,10 @@ export class TavilySearch extends StructuredTool<typeof inputSchema> {
348
362
349
363
includeFavicon ?: boolean ;
350
364
365
+ startDate ?: string ;
366
+
367
+ endDate ?: string ;
368
+
351
369
handleToolError = true ;
352
370
353
371
apiWrapper : TavilySearchAPIWrapper ;
@@ -398,6 +416,8 @@ export class TavilySearch extends StructuredTool<typeof inputSchema> {
398
416
this . country = params . country ;
399
417
this . autoParameters = params . autoParameters ;
400
418
this . includeFavicon = params . includeFavicon ;
419
+ this . startDate = params . startDate ;
420
+ this . endDate = params . endDate ;
401
421
}
402
422
403
423
async _call (
@@ -439,6 +459,8 @@ export class TavilySearch extends StructuredTool<typeof inputSchema> {
439
459
country : this . country ,
440
460
autoParameters : this . autoParameters ,
441
461
includeFavicon : this . includeFavicon ,
462
+ startDate : this . startDate ,
463
+ endDate : this . endDate ,
442
464
} ) ;
443
465
444
466
if (
You can’t perform that action at this time.
0 commit comments