Skip to content

Commit

Permalink
add defaults for tavily (langchain-ai#15075)
Browse files Browse the repository at this point in the history
  • Loading branch information
hwchase17 authored Dec 22, 2023
1 parent 4440ec5 commit 2e15993
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class TavilySearchResults(BaseTool):
"Useful for when you need to answer questions about current events. "
"Input should be a search query."
)
api_wrapper: TavilySearchAPIWrapper
api_wrapper: TavilySearchAPIWrapper = Field(default_factory=TavilySearchAPIWrapper)
max_results: int = 5
args_schema: Type[BaseModel] = TavilyInput

Expand Down Expand Up @@ -70,7 +70,7 @@ class TavilyAnswer(BaseTool):
"Input should be a search query. "
"This returns only the answer - not the original source data."
)
api_wrapper: TavilySearchAPIWrapper
api_wrapper: TavilySearchAPIWrapper = Field(default_factory=TavilySearchAPIWrapper)
args_schema: Type[BaseModel] = TavilyInput

def _run(
Expand Down

0 comments on commit 2e15993

Please sign in to comment.