[Deprecated] Experimental Anthropic Tools Wrapper
warning
The Anthropic API officially supports tool-calling so this workaround is no longer needed. Please use ChatAnthropic with langchain-anthropic>=0.1.15
.
This notebook shows how to use an experimental wrapper around Anthropic that gives it tool calling and structured output capabilities. It follows Anthropic's guide here
The wrapper is available from the langchain-anthropic
package, and it also requires the optional dependency defusedxml
for parsing XML output from the llm.
Note: this is a beta feature that will be replaced by Anthropic's formal implementation of tool calling, but it is useful for testing and experimentation in the meantime.
%pip install -qU langchain-anthropic defusedxml
from langchain_anthropic.experimental import ChatAnthropicTools
API Reference:ChatAnthropicTools