feat: add time range for tavily search component (#6092)
* added date option in tavily api * fix lint errors * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
parent
25dfe7f474
commit
974cf2ee20
1 changed files with 10 additions and 0 deletions
|
|
@ -43,6 +43,15 @@ class TavilySearchComponent(Component):
|
|||
value="general",
|
||||
advanced=True,
|
||||
),
|
||||
DropdownInput(
|
||||
name="time_range",
|
||||
display_name="Time Range",
|
||||
info="The time range back from the current date to include in the search results.",
|
||||
options=["day", "week", "month", "year"],
|
||||
value=None,
|
||||
advanced=True,
|
||||
combobox=True,
|
||||
),
|
||||
IntInput(
|
||||
name="max_results",
|
||||
display_name="Max Results",
|
||||
|
|
@ -86,6 +95,7 @@ class TavilySearchComponent(Component):
|
|||
"max_results": self.max_results,
|
||||
"include_images": self.include_images,
|
||||
"include_answer": self.include_answer,
|
||||
"time_range": self.time_range,
|
||||
}
|
||||
|
||||
with httpx.Client() as client:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue