Skip to content

Commit 938d3e5

Browse files
cr
1 parent 77740b4 commit 938d3e5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libs/providers/langchain-anthropic/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ The web fetch tool (`webFetch_20250910`) allows Claude to retrieve full content
185185
> **⚠️ Security Warning:** Enabling the web fetch tool in environments where Claude processes untrusted input alongside sensitive data poses data exfiltration risks. We recommend only using this tool in trusted environments or when handling non-sensitive data.
186186
187187
```typescript
188-
import { ChatAnthropic, webFetch_20250910 } from "@langchain/anthropic";
188+
import { ChatAnthropic, tools } from "@langchain/anthropic";
189189

190190
const llm = new ChatAnthropic({
191191
model: "claude-sonnet-4-5-20250929",
@@ -194,7 +194,7 @@ const llm = new ChatAnthropic({
194194
// Basic usage - fetch content from a URL
195195
const response = await llm.invoke(
196196
"Please analyze the content at https://example.com/article",
197-
{ tools: [webFetch_20250910()] }
197+
{ tools: [tools.webFetch_20250910()] }
198198
);
199199
```
200200

@@ -205,7 +205,7 @@ const response = await llm.invoke(
205205
"Summarize this research paper: https://arxiv.org/abs/2024.12345",
206206
{
207207
tools: [
208-
webFetch_20250910({
208+
tools.webFetch_20250910({
209209
// Maximum number of times the tool can be used in the API request
210210
maxUses: 5,
211211
// Only fetch from these domains
@@ -225,14 +225,14 @@ const response = await llm.invoke(
225225
You can combine web fetch with web search for comprehensive information gathering:
226226

227227
```typescript
228-
import { webSearch_20250305, webFetch_20250910 } from "@langchain/anthropic";
228+
import { tools } from "@langchain/anthropic";
229229

230230
const response = await llm.invoke(
231231
"Find recent articles about quantum computing and analyze the most relevant one",
232232
{
233233
tools: [
234-
webSearch_20250305({ maxUses: 3 }),
235-
webFetch_20250910({ maxUses: 5, citations: { enabled: true } }),
234+
tools.webSearch_20250305({ maxUses: 3 }),
235+
tools.webFetch_20250910({ maxUses: 5, citations: { enabled: true } }),
236236
],
237237
}
238238
);

0 commit comments

Comments
 (0)