diff options
Diffstat (limited to 'src/client/views/nodes/chatbot/tools')
| -rw-r--r-- | src/client/views/nodes/chatbot/tools/SearchTool.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/nodes/chatbot/tools/SearchTool.ts b/src/client/views/nodes/chatbot/tools/SearchTool.ts index 03340aae5..d22f4c189 100644 --- a/src/client/views/nodes/chatbot/tools/SearchTool.ts +++ b/src/client/views/nodes/chatbot/tools/SearchTool.ts @@ -6,7 +6,7 @@ import { ParametersType } from '../types/tool_types'; const searchToolParams = [ { - name: 'query', + name: 'queries', type: 'string[]', description: 'The search query or queries to use for finding websites', required: true, @@ -20,7 +20,7 @@ export class SearchTool extends BaseTool<SearchToolParamsType> { private _addLinkedUrlDoc: (url: string, id: string) => void; private _max_results: number; - constructor(addLinkedUrlDoc: (url: string, id: string) => void, max_results: number = 5) { + constructor(addLinkedUrlDoc: (url: string, id: string) => void, max_results: number = 4) { super( 'searchTool', 'Search the web to find a wide range of websites related to a query or multiple queries', @@ -33,8 +33,9 @@ export class SearchTool extends BaseTool<SearchToolParamsType> { } async execute(args: ParametersType<SearchToolParamsType>): Promise<Observation[]> { - const queries = args.query; + const queries = args.queries; + console.log(`Searching the web for queries: ${queries[0]}`); // Create an array of promises, each one handling a search for a query const searchPromises = queries.map(async query => { try { |
