Skip to content

Commit 521ca78

Browse files
cr
1 parent 6830e26 commit 521ca78

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
@@ -189,7 +189,7 @@ The web fetch tool (`webFetch_20250910`) allows Claude to retrieve full content
189189
> **⚠️ 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.
190190
191191
```typescript
192-
import { ChatAnthropic, webFetch_20250910 } from "@langchain/anthropic";
192+
import { ChatAnthropic, tools } from "@langchain/anthropic";
193193

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

@@ -209,7 +209,7 @@ const response = await llm.invoke(
209209
"Summarize this research paper: https://arxiv.org/abs/2024.12345",
210210
{
211211
tools: [
212-
webFetch_20250910({
212+
tools.webFetch_20250910({
213213
// Maximum number of times the tool can be used in the API request
214214
maxUses: 5,
215215
// Only fetch from these domains
@@ -229,14 +229,14 @@ const response = await llm.invoke(
229229
You can combine web fetch with web search for comprehensive information gathering:
230230

231231
```typescript
232-
import { webSearch_20250305, webFetch_20250910 } from "@langchain/anthropic";
232+
import { tools } from "@langchain/anthropic";
233233

234234
const response = await llm.invoke(
235235
"Find recent articles about quantum computing and analyze the most relevant one",
236236
{
237237
tools: [
238-
webSearch_20250305({ maxUses: 3 }),
239-
webFetch_20250910({ maxUses: 5, citations: { enabled: true } }),
238+
tools.webSearch_20250305({ maxUses: 3 }),
239+
tools.webFetch_20250910({ maxUses: 5, citations: { enabled: true } }),
240240
],
241241
}
242242
);

0 commit comments

Comments
 (0)