Overview
Integration details
| Class | Package | PY support | Version |
|---|---|---|---|
| TavilyMap | @langchain/tavily | ✅ |
Setup
The integration lives in the@langchain/tavily package, which you can install as shown below:
Credentials
Set up an API key here and set it as an environment variable namedTAVILY_API_KEY.
Instantiation
You can import and instantiate an instance of theTavilyCrawl tool like this:
Invocation
Invoke directly with args
The Tavily crawl tool accepts the following arguments during invocation:-
url(required): A natural language search query -
The following arguments can also be set during invocation :
instructions,selectPaths,selectDomains,excludePaths,excludeDomains,allowExternal,categories.
Invoke with ToolCall
We can also invoke the tool with a model-generatedToolCall, in which case a @[ToolMessage] will be returned: