You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/app/service/agent/tools/web_fetch.ts
+22-3Lines changed: 22 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,16 @@ import { extractHtmlContent } from "@App/app/service/offscreen/client";
6
6
exportconstWEB_FETCH_DEFINITION: ToolDefinition={
7
7
name: "web_fetch",
8
8
description:
9
-
"Fetch content from a URL. Returns extracted text for HTML pages, raw content for JSON/plain text. Use this to read web pages, APIs, or download text content.",
9
+
"Fetch content from a URL. Returns extracted text for HTML pages, raw content for JSON/plain text. Use this to read web pages, APIs, or download text content. "+
10
+
"Use prompt to have the LLM summarize/extract specific information from the fetched content.",
10
11
parameters: {
11
12
type: "object",
12
13
properties: {
13
14
url: {type: "string",description: "The URL to fetch (http/https)"},
15
+
prompt: {
16
+
type: "string",
17
+
description: "When provided, the content will be processed by LLM to extract/summarize based on this prompt",
18
+
},
14
19
max_length: {type: "number",description: "Max characters to return (no limit by default)"},
15
20
},
16
21
required: ["url"],
@@ -28,10 +33,18 @@ export function stripHtmlTags(html: string): string {
0 commit comments