Overview
Integration details
Class | Package | PY support | Version |
---|---|---|---|
DuckDuckGoSearch | @langchain/community | ✅ |
Setup
The integration lives in the@langchain/community
package, along with the duck-duck-scrape
dependency:
Credentials
It’s also helpful (but not needed) to set up LangSmith for best-in-class observability:Instantiation
You can instantiate an instance of theDuckDuckGoSearch
tool like this:
Invocation
Invoke directly with args
Invoke with ToolCall
We can also invoke the tool with a model-generatedToolCall
, in which case a ToolMessage
will be returned: