Elffuss BraidHub

kikocis/continue public

4940c71be2bf · 1.4 KiBRawPermalink
1import { Tool } from "../..";
2
3import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
4import { createSystemMessageExampleCall } from "../systemMessageTools/buildToolsSystemMessage";
5
6export const searchWebTool: Tool = {
7 type: "function",
8 displayTitle: "Search Web",
9 wouldLikeTo: 'search the web for "{{{ query }}}"',
10 isCurrently: 'searching the web for "{{{ query }}}"',
11 hasAlready: 'searched the web for "{{{ query }}}"',
12 readonly: true,
13 group: BUILT_IN_GROUP_NAME,
14 function: {
15 name: BuiltInToolNames.SearchWeb,
16 description:
17 "Performs a web search, returning top results. Use this tool sparingly - only for questions that require specialized, external, and/or up-to-date knowledege. Common programming questions do not require web search.",
18 parameters: {
19 type: "object",
20 required: ["query"],
21 properties: {
22 query: {
23 type: "string",
24 description: "The natural language search query",
25 },
26 },
27 },
28 },
29 defaultToolPolicy: "allowedWithoutPermission",
30 systemMessageDescription: createSystemMessageExampleCall(
31 BuiltInToolNames.SearchWeb,
32 `To search the web, use the ${BuiltInToolNames.SearchWeb} tool with a natural language query. For example, to search for the current weather, you would respond with:`,
33 [["query", "What is the current weather in San Francisco?"]],
34 ),
35};