Overview
Integration details
Class | Package | PY support | Version |
---|---|---|---|
TavilyExtract | @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 theTavilyExtract
tool like this:
Invocation
Invoke directly with args
The Tavily Extract tool accepts the following arguments during invocation:-
urls
(required): A list of URLs to extract content from. -
Both
extractDepth
andincludeImages
can also be set during invocation
Invoke with ToolCall
We can also invoke the tool with a model-generatedToolCall
, in which case a ToolMessage
will be returned: