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: pkg/cmd/web.go
+77Lines changed: 77 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,42 @@ import (
14
14
"github.com/urfave/cli/v3"
15
15
)
16
16
17
+
varwebAnswers= cli.Command{
18
+
Name: "answers",
19
+
Usage: "Researches the live web and returns a sourced answer in your requested JSON\nshape. Select fast for a smaller research budget at 10 credits or ultra for\ndeeper reasoning at 100 credits. Defaults to ultra. Fast research is limited to\n30 seconds and ultra to 50 seconds; timeoutMS can shorten either deadline.",
20
+
Suggest: true,
21
+
Flags: []cli.Flag{
22
+
&requestflag.Flag[string]{
23
+
Name: "task",
24
+
Usage: `What to research and answer, in plain language. Naming a domain in the task (for example "pricing on context.dev") makes the agent read that site before it searches.`,
25
+
Required: true,
26
+
BodyPath: "task",
27
+
},
28
+
&requestflag.Flag[map[string]any]{
29
+
Name: "json-format",
30
+
Usage: `An example object with placeholder values (for example {"pricing_page_url": "", "plans": [{"name": "", "price": 0}]}). Object keys and value types are preserved; unknown values may be null. Empty arrays accept any JSON items. Defaults to {"result": ""}. Maximum 8 levels, 500 values, and 16000 characters.`,
31
+
BodyPath: "json_format",
32
+
},
33
+
&requestflag.Flag[string]{
34
+
Name: "mode",
35
+
Usage: "Research level: fast uses a smaller model and research budget for 10 credits; ultra uses deeper reasoning and research for 100 credits. Defaults to ultra. Only successful requests consume credits.",
36
+
BodyPath: "mode",
37
+
},
38
+
&requestflag.Flag[[]string]{
39
+
Name: "tag",
40
+
Usage: "Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.",
41
+
BodyPath: "tags",
42
+
},
43
+
&requestflag.Flag[int64]{
44
+
Name: "timeout-ms",
45
+
Usage: "Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).",
Usage: "Crawl a website, use the provided JSON Schema and instructions to prioritize\nrelevant internal links, and extract structured data from the selected pages.",
@@ -1010,6 +1046,47 @@ var webWebScrapeSitemap = cli.Command{
0 commit comments